Answer Posted / subbu
//the System class belongs to java.lang package
class System {
public static final PrintStream out;
//...
}
//the Prinstream class belongs to java.io package
class PrintStream{
public void println();
//...
}
java.lang package is default package hence no need to import
additionaly to use System class
System is having static reference of PrintStream class whihc
has println() method.
So we can directly acces the println() using out referece.
System.out.println();
| Is This Answer Correct ? | 16 Yes | 0 No |
Post New Answer View All Answers
Where is jre installed?
Explain the difference between jdk, jre, and jvm?
What is class??
What do you mean by collectors in java 8?
What are the core java topics?
What is meant by structural programming?
What is the java project architecture?
Can a main method be declared final?
What is an image buffer?
What is primitive data type in java?
How we can make copy of a java object?
Can a class have an interface?
How do I write a self declaration?
What is pojo class in java?
What is regex java?