Difference Between Print AND println IN JAVA ๐Ÿ˜Š

ยท

1 min read

So hello guys today I am here to make you aware about the most common term used in Java

1)Print

2)Println

print --> It helps in only printing the output of the code written by a programmer as if u write

public class main{

public static void main(String args[]){

int a=10;

int b=20;

System.out.print(a);

System.out.print(b);

}

}

It gives the output as

10 20

but when I use the Println function

public class main{

public static void main(String args[]){

int a=10;

int b=20;

System.out.println(a);

System.out.println(b);

}

}

then the output comes to be

10

20

THANKS for reading my blog

ย