Answer Posted / surya simhadri
System is a predefined class in lang package and out is a
static member with in a System class and also out is an
instance of PrintStream which is a static inner class of
System class and finally print() and println() are member
functions of PrintStream class. So we can call those
methods using out and out is called with class name in
which it is declared( bcoz it is static member variable of
system class). So finally we can call println as
System.out.println().
EX:
class System {
static public PrintStream out;
public static class PrintStream {
public string print(String s) {
}
public string println(String s) {
}
public static void main(String[] arg) {
System.out=new PrintStream();
System.out.println("");
}
}
}
| Is This Answer Correct ? | 20 Yes | 1 No |
Post New Answer View All Answers
What is the static block?
What is the constructor?
What is the main difference between java platform and other platforms?
Why are data types important?
Is minecraft 1.15 out?
Is linked list a linear or non-linear data structure?
Which class represents the socket that both the client and server use to communicate with each other?
What flag up means?
What is a methodologist?
How to find the given number is a prime number or not by getting input from the user
What is the use of hashmap in java?
What is a pointer and does java support pointers?
Can constructor be protected in java?
What is the difference between the prefix and postfix forms of the ++ operator?
explain the difference between jdk and jvm?