explain System.out.println
Answer Posted / himanshu
//a program to understand how System.out.println works
class Temp{//here "class Temp{"=>"class System{"
static Demo d;//here "static Demo d"=>"static PrintStream out"
static{
d=new Demo();//here "d=new Demo()"=>"out=new PrintStream()"
}
}
class Demo{//here "class Demo{"=>"class PrintStream{"
void show(){//here "show(){"=>"println(){"
System.out.println("Hello");
}
}
class Xyz{
public static void main(String a[]){
Temp.d.show();
}
}
/*-------------------
OUTPUT
---------------------
Hello
*/
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the core java topics?
What carriage return means?
What does I ++ mean?
What is hashset in java?
What is remote method invocation (rmi)?
What is the difference between break and continue statements?
Is it possible to instantiate the abstract class?
What data type is true or false?
What are inbuilt functions?
What is the buffer limit?
What is a parameter in a function?
What does += mean coding?
What is the difference between jvm and jre? What is an interface?
Why does java have different data types for integers and floating-point values?
What is the difference between a window and a frame in java programming?