ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Google
   
 
Categories >> Software >> Java Related >> Java J2EE >> Core Java
 
 


 

 
 Core Java interview questions  Core Java Interview Questions (1721)
 Advanced Java interview questions  Advanced Java Interview Questions (331)
 Swing interview questions  Swing Interview Questions (44)
 EJB interview questions  EJB Interview Questions (134)
 Servlets interview questions  Servlets Interview Questions (255)
 Struts interview questions  Struts Interview Questions (196)
 JDBC interview questions  JDBC Interview Questions (187)
 JMS interview questions  JMS Interview Questions (9)
 SunOne interview questions  SunOne Interview Questions (3)
 J2EE interview questions  J2EE Interview Questions (71)
 Weblogic interview questions  Weblogic Interview Questions (146)
 Websphere interview questions  Websphere Interview Questions (14)
 Java Networking interview questions  Java Networking Interview Questions (20)
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions (87)
Question
explain System.out.println
 Question Submitted By :: Core-Java
I also faced this Question!!     Answer Posted By  
 
Answer
# 1
'System' is a class in java.lang package
'out' is a static object of PrintStream class in java.io
package
'prinln()' is method in the PrintStream class.....
 
Is This Answer Correct ?    756 Yes 56 No
Arun Gopal
 
Answer
# 2
'system' is a public class which is final which can never
be extended..It itself extends object.
'out' is the static object of the class PrintStream.
'println()' is the method of printStream class..
since 'out' is a static object it can be called by using
the class name'system'
so 'Sstem.out.println()'
 
Is This Answer Correct ?    351 Yes 42 No
Jacob.p.george
 
 
 
Answer
# 3
System: its the class
out: its the object of the class System
println():its the method which tells the compiler to print
a new line.
 
Is This Answer Correct ?    376 Yes 266 No
Franklin
 
Answer
# 4
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 ?    59 Yes 10 No
Lakshmi
 
Answer
# 5
System : It is a standard java class. It comes from the
java.lang package. it is bydefault package.
Out : The class system contains static field named "out".
so System.out referes to the value stored in that static
filed. the value System.out is an object of the class
printStream from the standard java package java.io.
Println() : it is the instance method come from the
PrintStream class.

so System.out.println() calls the "Println()" method
associated with the "printStream" object referred to by
static field "out"
 
Is This Answer Correct ?    53 Yes 11 No
Mallikarjuna G
 
Answer
# 6
System:-It is the final class and its constructor is
private.so we can not create new object of System.

out. it is the static member of the System class of type
java.io.PrintStrem.
println:-it is the overload function of PrintStream.
 
Is This Answer Correct ?    74 Yes 44 No
Chhote Lal Prasad Gupta
 
Answer
# 7
There is a class called System.

It has a static member attribute called "out", which is of
type PrintStream.

PrintStream provides a method called "println", which is
what you're calling.
 
Is This Answer Correct ?    67 Yes 41 No
Nilesh
 
Answer
# 8
System is a class
out is static object
println() is a method
 
Is This Answer Correct ?    34 Yes 11 No
Narasimha Rao
 
Answer
# 9
'System' is a class in 'java.lang' package, which is a
final class(can not be inherited) and its constructor is
private(can not be inherited)
'out' is a static member variable of 'System' class which
is of type 'PrintStream'
'println()' is a method of 'PrintStream' class
So 'System.out.println()' means calling of method 'println
()'of the static 'PrintStream' type variable 'out'
of 'System' class.
And is used to print a String to the system console.
 
Is This Answer Correct ?    24 Yes 13 No
Dipanjan Paul
 
Answer
# 10
System: Class of java.lang package
out: predefine stream variable
println: method of PrintStream class (which is a type of
object reference by System.out)
 
Is This Answer Correct ?    15 Yes 9 No
Trip
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
Have you used any version control ? if so explain about it?   2
please tell me what is wrapper class in java with example ? HP 5
how cani read a command line argument?(usingfile object).   3
what is jdk1.5 features? Virtusa 6
Suppose there is an Online shopping cart application having different objects like Cart, SelectionItem, Billing, COnfiguration, Authentication, Authorization, PersonalDetails etc. Out of this which one can be made a singleton pattern and why? RBS 2
System.out.println("somestring"); It will create any object or not CSC 5
Can a Byte object be cast to a double value?   3
what is the use of clone() in real time scenario? Quinnox 2
What is the superclass of exception?   3
Hi ,i convert contrller as jSp And presentation as servlet ...will it do? if so what are advantage and idsadvantages IBM 2
I want to run a simple hello world java (HelloWorld.java) program using a batch file. How can i run it and how to construct a batch file. Infosys 1
what is wrapper class and its uses?   2
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com