Saturday, December 29, 2018

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.

0 comments:

Post a Comment

selenium-repo by venu

Blog helps to a student or IT employee to develop or improve skills in Software Testing.
For Online Classes Email us: gadiparthi122@mail.com

Followers

About Me

My photo
Hyderabad, Andhra Pradesh, India
I am Automation Testing Professional. I have completed my graduation in B.Tech (Computers) from JNTU Hyderabad and started my career in Software Testing accidentally since then, I passionate on learning new technologies

Contact Form

Name

Email *

Message *

Popular Posts