explain System.out.println
Answer Posted / lakshmi
System.out.prinltn
System
--------
> pre-defined class in java.lang package
out
--------
out- it is a static variable inside System class of type PrintStream(class reference variable)
(ie) static PrintStream out;
and PrintStream is a predefined class in java.io package.
since its static thats why we are calling
System.out
so System.out means we are getting the reference to the object of type PrintStream
println
-------
println is the method in PrintStream class for Standard output stream.
so to access println method , i need PrintStream object which we are getting through System.out.
so finally
its System.out.println---- to produce standard output Stream
println-method name
| Is This Answer Correct ? | 65 Yes | 11 No |
Post New Answer View All Answers
What is Java Reflection API? Why it’s so important to have?
Can we synchronize static methods in java?
Explain the meaning of java applet.
What are the drawbacks for singleton class?
What is the difference between hashmap and hashtable in java?
What is meant by the value of a variable?
What is the main purpose of java?
What is meant by class and object in java?
Why java is not 100% object-oriented?
Why are constructors used?
what methods would you overwrite in java.lang.object class?
What is the purpose of abstract class?
Can we create an object if a class doesn't have any constructor ( not even the default provided by constructor ) ?
Is arraylist ordered in java?
explain the concept of virtual method invocation in polymorphism in detail?