CDAC-ACTS Interview Question
Software Engineer / DevelopersCountry: United States
/***1-System is a final(cannot extend) subclass of Object class.***/
public final class System extends Object{
public static final PrintSteam out;
...................
..................
}
/*2-out is an class object of PrintStream class*/
/***3- println is just a method defined in PrintStream
So out.println just call this method
***/
- System refers to the class System (java.lang.System).
- kddev1109 May 13, 2011- out is the static PrintStream (java.io.PrintStream) variable of the System class. It is nothing but the standard output stream.
- println is a method of the PrintStream class that prints the data to the output stream.