System.out.println(). Simply SOP
System: is a final class in java.lang package. This class has methods to provide access to Standard Input, Standard Output and Standard Error Output streams. Can not be instantiated.
out: is final static variable of type PrintStream declared in the System class.
println(): is a overloaded method in PrintStream class. It accepts an expression as an argument and displays it in String form to the Standard Output. It is also a reference variable of Print Stream class and access println() of same class.
Below are the overloaded methods of println in PrintStream class with different arguments.
println();
println(String x);
println(boolean x);
println(char x);
println(int x);
println(long x);
println(float x);
println(double x);
println(char x[]);
println(Object x);
Every println() method makes a call to print() and adds a newline.
Note: System class can not be instantiated as constructor is declared as private.
System: is a final class in java.lang package. This class has methods to provide access to Standard Input, Standard Output and Standard Error Output streams. Can not be instantiated.
out: is final static variable of type PrintStream declared in the System class.
println(): is a overloaded method in PrintStream class. It accepts an expression as an argument and displays it in String form to the Standard Output. It is also a reference variable of Print Stream class and access println() of same class.
Below are the overloaded methods of println in PrintStream class with different arguments.
println();
println(String x);
println(boolean x);
println(char x);
println(int x);
println(long x);
println(float x);
println(double x);
println(char x[]);
println(Object x);
Every println() method makes a call to print() and adds a newline.
Note: System class can not be instantiated as constructor is declared as private.
0 comments:
Post a Comment