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
Hi Anyone know the model / questions of the Federal bank sample questions for the post of Specialist Officers - Programmers. Please post if anyone have..
Is it possible to write a regular expression to check if string is a number?
Difference between association, composition and aggregation?
Can we return null in java?
What access modifiers can be used for class ?
Implement a stack with push (), pop() and min() in O(1) time.
How do you invoke a method?
How we can make copy of a java object?
Explain covariant method overriding in java.
Why spring singleton is not thread safe?
What is an immutable object? How do you create one in java?
What is user defined exception in Java?
Which class is the superclass for all the classes?
What are the principle concepts of oops?
What is hash table in java?