Tags » Java Programming

Populate a 2d array with characters from the ASCII Table and read it as a matrix

	public char[][] generateAsciiMatrix(){
		
		char [][] asciiTable = new char;
		char asciiChar = 32;
		char [] asciiCharArray = new char;
		
		for (int i = 0; i < asciiCharArray.length; i++) {
			asciiCharArray[i] = asciiChar;
			asciiChar++;
		}
		
		
		for(int row = 0; row < asciiTable.length; row++){
			for(int col = 0; col < asciiTable.length; col++){
				for(int i = 0; i < asciiCharArray.length; i++){
					
					if((asciiCharArray + i) <= 126){
						asciiTable[i] = (char) (asciiCharArray + i);
					}else{
						asciiTable[i] = (char) ((asciiCharArray + i) - 95);
					}
				}
				
			}
			
		}
		
		 // print the ascii table as a matrix	
		for(int row = 0; row < asciiTable.length; row++){
			System.out.println(String.valueOf(asciiTable));
		}
		
		return asciiTable;
	} 6 more words
Java Programming

Secure Your Data Series: Protecting from SQL Injection

I have been collecting data and building databases for a while. As I do so, I have come across a wide variety of mistakes in thought and code varying from the notion that a captcha works to a failure to adequately protect from SQL injection. 447 more words

Java Programming

Guess Game Java

This is a simple Java program where the user selects a random number between 0 and 100. The computer has seven attempts at guessing the number. 174 more words

Java Programming

NetBeans 8 & Wildfly Application Server 8 Configuration

1.    Download JDK 7 from here

2.   Download NetBeans 8 from here.  (All Version)

3.   Download latest Wildfly Application Server 8 from here. 79 more words

Netbeans

JSF Primefaces Application on Wildfly 8 using Netbeans 8

How to configure Netbeans 8 & Wildfly 8 please read my Blog here

1.   Download Primefaces Library from here (Comunity Version)

2.   Create New Project : Right mouse click on Project’s Panel… 91 more words

Netbeans

#011 Java Socket Programming

Here i am going to create two classes, one is Server and other is Client.

This demonstrates Java Socket Programming and Networking. 205 more words

Programming

#010 Retrieve Image From Databases in Java

This demo represents how to retrieve image from database and store it into the local storage.

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream; 109 more words

Programming