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
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.
What is method overloading and method overriding?
Is 0 a real number?
What do you understand by weak reference?
What is unsigned char?
How are java objects passed to a method and what are native methods?
Explain the difference between abstraction and encapsulation.
What is the symbol for average?
How many bits is size_t?
What is the purpose of garbage collection in java? When is it used?
How to calculate the length of a singly linked list in java?
What is string immutability?
What about abstract classes in java?
is there a separate stack for each thread in java? : Java thread
What are namespaces in java?