PUB ID

Saturday, 2 January 2016

What is the difference between print() method ,prinln() method ?

print()
1.print() prints the characters in same line,
2.without passing any argument  you can not use print() method.
 println()
1. println() writes the character in next line,
2.you can use println() without passing any argument

 these two methods are overloaded methods in java.io.PrintStream class

No comments:

Post a Comment