+ 2

What is the difference between print and println?

for printing stuff on screen we use System.out.print(); or System.out.println(); So what's different between print and println?

7th Jan 2017, 9:52 PM
Pankaj Vaghela
Pankaj Vaghela - avatar
1 Answer
+ 7
Well print() prints it without a new line println prints it with a new line for eample: System.out.print("Hi"); System.out.print("Hi"); System.out.print("Hi"); => output: HiHiHi System.out.println("Hi"); System.out.println("Hi"); System.out.println("Hi"); => output: Hi Hi Hi
7th Jan 2017, 10:06 PM
Manuel Wiltz
Manuel Wiltz - avatar