+ 1

tell me difference between System.out.println(); and System.out.print();

tell me difference between System.out.println(); and System.out.print();

23rd Sep 2017, 5:08 PM
Tushar Sharma
Tushar Sharma - avatar
2 Answers
+ 13
TheĀ println() method, after being called, prints the required text as the output and moves the cursor to a new line. The print() method insteadĀ printsĀ just the text but does not move the cursor to a new line.Ā 
23rd Sep 2017, 5:13 PM
Dev
Dev - avatar
+ 7
System.out.print(args) Will print your args out to console while System.out.println(args) Will print your args out to console but also print ascii characters at 10 and 13 out
23rd Sep 2017, 5:16 PM
Yanothai Chaitawat
Yanothai Chaitawat - avatar