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.

Related Posts:

  • Type Casting Type Casting: The process of converting value of one Datatype to another Datatype. Two ways of Casting: Widening:  Converting a smaller datatype to higher datatype is called widening. byte-> short -> char … Read More
  • Manual Testing QuestionsWhat is Smoke Testing?Smoke Testing: This is build acceptance Testing performed after build is released to the Testing. This Testing is done to check the major functionalities are working fine or not.What is Sanity Testing?Sa… Read More
  • Selenium Interview Questions and Answers I have attended some interviews during my career. I am sharing with you questions i was asked in the interviews. Hope these questions are helpful to the readers.    A Java Program to retrieve the data fro… Read More
  • Variables and Methods Variables: Variable is a name given to a memory location in which, we can store some value which can be used in a program. Variable Declaration: It is process of specifying what type of data to be stored into the memory … Read More
  • Data Types in Java Based on the type of data stored, data types are classifying as 3 types in Java. Primitive Datatype (Fundamental Datatype): Derived Datatype User Defined Datatype Primitive Datatype (Fundamental Datatype):  The da… Read More

0 comments:

Post a Comment

Selenium Training in Realtime

Blog helps to a student or IT employee to develop or improve skills in Software Testing.

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