Differently between print and println

ok, i will explain about differently print and println,

suddenly i’m finding this code and i will be know about differently print and println, you can look this code and i hope you know about this differently.

source code 1 :

public class Differently1{
public static void main(String[] args){
int[][] data = new int[10][5];
for (int i=0; i<data.length;i++){
for(int x=0; x<data[i].length; x++){
System.out.println("" + data[i][x]);
}
System.out.println("");
}
}
}

Source code 2 :

public class Differently2{
public static void main(String[] args){
int[][] tuing = new int[10][5];
for(int x=0; x<tuing.length; x++){
for(int y=0; y<tuing[y].length; y++){
System.out.print(" " + tuing[x][y]);
}
System.out.println("");
}
}
}

after you compile the code you will be know something about differently print and println.

compile the first code view :
0
0
0
0
0

0
0
0
0
0

…and ect

the second code to compile will be viewed :
00000
00000
00000
00000
00000

ok, this differently about print and println, Sorry my english language very bad. I will learn and learn write english article to be best. thank's you read my article..:D

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s