explain System.out.println

Answer Posted / mallikarjuna g

System : It is a standard java class. It comes from the
java.lang package. it is bydefault package.
Out : The class system contains static field named "out".
so System.out referes to the value stored in that static
filed. the value System.out is an object of the class
printStream from the standard java package java.io.
Println() : it is the instance method come from the
PrintStream class.

so System.out.println() calls the "Println()" method
associated with the "printStream" object referred to by
static field "out"

Is This Answer Correct ?    55 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a stringbuffer?

504


Explain wrapper classes in java?

522


What is the difference between serial and throughput garbage collector?

573


Can a class have an interface?

544


Explain restrictions on using enum?

619






What is variable explain with example?

564


How to overcome the exception object reference not set to an instance of object?

610


What are advantages of exception handling in java?

574


Can an interface extend a class?

532


What value is a variable of the string type automatically initialized?

603


How do you remove all elements from an arraylist in java?

497


Program to Find the second largest element in an array.

578


Can I import same package/class twice?

483


What is file in java?

549


How to obtain a performance profile of java program

538