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 are the differences between stringbuffer and stringbuilder?
What is the use of 'super' keyword inside a constructor?
Do extraneous variables affect validity?
What is private static in java?
How does regex work?
What are the important features of Java 11 release?
What is the use of put method?
What is default size of arraylist in java?
Can we have more than one package statement in the source file?
What are the advantages of exception handling in java?
What are the two types of java programming?
Why set is used in java?
Explain different ways of creating a thread. Which one would you prefer and why?
How will you print number in reverse (descending) order in BST.
What restrictions are placed on method overriding in java programming?