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
String and stringbuffer both represent string objects. Can we compare string and stringbuffer in java?
Does java support function overloading, pointers, structures, unions or linked lists?
Difference between collection, collection and collections in java?
What are the 4 types of research methods?
What is difference in between java class and bean?
Explain about wait() method?
How do you create a reference in java?
What are the super most classes for all the streams?
What is tree in java?
Can I import same package/class twice?
What is a blocking method in Java?
What is the main advantage of passing argument by reference?
How do you declare a variable?
What is ascii format?
Can static methods be inherited?