What is meant by printIn( ) ??
Printable View
What is meant by printIn( ) ??
The println is a method of System.out Object that is integrated in java.lang package.. It is used like a cout in C++, we use a System.out.print(); when we want result in a single row,otherwise we use System.out.println() that is used to return a result in a new paragraph.Println method return String in fact every thing in his space better to say body convert it in string and show u in the console ex. System.out.println( 5+" equals "+ 5); execution trace:
1.> System.out.println(5+"equals 5");
2.>System.out.println("5 equals 5");
//And all what u see in u'r console is :
5 equals 5.:P
PrintIn (with an upper-case I as in Igloo) or Println (with a lower-case l as in leopard)?
I have no idea what the first one could be. It's not in the standard Java SE API, but could be in some external library you are using. If so, please tell us which library it's from.
The second one is as MaGgy described. It also prints out a line-separator string (on windows, it's \r\n, on Linux and possibly mac it's just \n).
ex:
result:Code :System.out.println("first line"); System.out.println("second line);
first line
second line