explain System.out.println

Answer Posted / lalit bhangale

System.out.println();
System is the Class in which out is static object of
class PrintStream which refers t othe standard output ie
console output,
and PrintStream class contains the method println()
which will be accessed using PrintStream object out.
Since out is static so it can be only accessed using
class name in which it contains.
so System.out.println(); simply invokes println()
method to output specified data to standard output console.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Draw a UML class diagram for the code fragment given below: public class StringApplet extends Applet { private Label sampleString; private Button showTheString; private ButtonHandler bHandler; private FlowLayout layout; public StringApplet() { sampleString = new Label(" "); showTheString = new Button (" Show the String"); bHandler = new ButtonHandler(); layout = new FlowLayout(); showTheString.addActionListener(bHandler); setLayout(layout); add(sampleString); add(showTheString); } class ButtonHandler implements ActionListener { public void actionPerformed(ActionEvent e) { samplestring.setText("Good Morning"); } } } Note: The methods need not be indicated on the diagram.

1590


What is method overloading and method overriding?

538


Is 0 a real number?

590


What do you understand by weak reference?

561


What is unsigned char?

626






How are java objects passed to a method and what are native methods?

596


Explain the difference between abstraction and encapsulation.

539


What is the symbol for average?

520


How many bits is size_t?

545


What is the purpose of garbage collection in java? When is it used?

543


How to calculate the length of a singly linked list in java?

584


What is string immutability?

543


What about abstract classes in java?

612


is there a separate stack for each thread in java? : Java thread

544


What are namespaces in java?

527