Tuesday, 10 September 2013

System.out.Println Java


We usually use many or dozen of times but do we really know what it is.
System.out.println() just prints the argument passed  into the System.out.

System.out.println():
1.System: It is a final class and cannot be inherited .For further know-how refer to javadocs.
2.out: It is of type PrintStream and static menber of System Class.The Access specifiers for it is public final.
3.println():As braces itself says that it is a function that print whatever pass to it in the standard console.
 Every println makes a call to print method and print calls to write method .

A simple program to print Hello using System.out.println():
class a
{
public static void main(Strings args[])
{
System.out.println("Hello") ;
}
}
Compile:javac a.java
run:java a

No comments:

Post a Comment