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
Why we use methods in java?
What are data types in oop?
How do I type unicode?
Where is const variable stored?
Can variables be used in java without initialization?
How many arguments can be passed to main ()?
Write code of any action class?
What is difference between final and immutable?
What is substring 1 in java?
What is hashset in java?
What is a java object and java application?
What is an example of procedure?
Difference between overriding and overloading in java?
What are heap memory and stack memory and what are memory tables.
How to optimize the javac output?