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
Which class is used by server applications to obtain a port and listen for client requests?
What is difference between next () and nextline () in java?
What is keyword in oop?
What is the purpose of encapsulation?
take an array with -ve and +ve value both.find out the nearest value of 0(zero).if two values are same like(-2 and +2)then extract +2 is nearest of 0(zero).
Can you change array size in java?
How to create an immutable class?
What are sets in java?
How many types of voids are there?
What 4 doubled?
Why java applets are more useful for intranets as compared to internet?
Explain about map interface in java?
Can we assign the reference to this variable?
What is covariant return type?
Which way a developer should use for creating thread, i.e. Sub classing thread or implementing runnable.