how system.out.println() works?

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


Please Help Members By Posting Answers For Below Questions

How many digits is int32?

537


Is empty list java?

525


What is method in java with example?

491


What is local class in java?

520


What is constructor in java ?

635






How to connect to a remote database using Applet?

2045


What is bytecode in java ?

608


What is ‘is-a ‘ relationship in java?

590


What is lazy initialization in java?

556


Is null a string in java?

556


How define set in java?

514


How can we make sure main() is the last thread to finish in java program?

672


How many bits are used to represent unicode, ascii, utf-16, and utf-8 characters in java programming?

556


Does java have a compiler?

556


Who found java?

553