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
What is 16 bits called?
Is main an identifier?
Explain an algorithm to find depth of a binary tree.
Is java util list serializable?
What is dot operator?
Define iterator and methods in iterator?
What is unsigned char?
what are abstract functions?
What is method overloading with type promotion?
What are the practical benefits, if any, of importing a specific class rather than an entire package (e.g. Import java.net.* Versus import java.net.socket)?
What are the restrictions imposed on method overriding?
What is linked hashmap and its features?
What is proper subset?
Name four container classes.
What is scope of a variable?