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 (1722)
 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 (147)
 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
define  System.out.println(); what is the meaning!
 Question Submitted By :: Core-Java
I also faced this Question!!     Answer Posted By  
 
Answer
# 1
System is a class and out is a static attribute which is of
type printstream. printstream class has a method called
println().
 
Is This Answer Correct ?    64 Yes 18 No
Mohit Gupta
 
Answer
# 2
System is class in java.lang package

out is a static member of type PrinStream class(java.io)
declared in the System class.static members of a class can
be accessed directly by classname that's why System.out.

println is a method in PrintStream class.out is of type
PrintStream that's why you access println w.r.t out.

why this big statement? because here no need to import any
package, like you include a header file in c or
c++.java.lang is the default package.
 
Is This Answer Correct ?    52 Yes 7 No
P.nandakishore
 
 
 
Answer
# 3
System: System refers to current java program.

out: out refers to output device. by default it is monitor.

println: to print the specific string onto output device in
next line

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 ?    125 Yes 90 No
Muffy
 
Answer
# 4
system- is a class

out-is a field of type printstream

println-is a meathod in printstream class
 
Is This Answer Correct ?    37 Yes 14 No
Mohanjayaseelan
 
Answer
# 5
system- system is predefined class to provide access to the
system
out - out is the output stream used to connect the
console
println- println is method which is tell the compiler to
write a new line in our console
 
Is This Answer Correct ?    28 Yes 18 No
Rinal
 
Answer
# 6
System- public final class System extends Object

The System class contains serveral useful class
fields and methods.it cannot be instantiated

out-

The out variable in the System class refers to (points
to) an instance of the PrintStream class (a PrintStream
object) which is automatically instantiated when the System
class is loaded into the application.

println()-the println() methods in class PrintStream.

System.out.prinln("HI DILIP ");

This statement invokes the println() method of an object of
the PrintStream class which is referred to (pointed to) by
the variable named out which is a class variable of the
System class.
 
Is This Answer Correct ?    13 Yes 3 No
Dilip Yadav
 
Answer
# 7
in java system is predefine class that provides access to
the system.

in java out means,out is the output stream that is
connected to the console.

in java println is a one method which is print the statment.
 
Is This Answer Correct ?    14 Yes 6 No
Amit J Bhavsar
 
Answer
# 8
System is a class defined in java.lang package(public final
class System extends Object) that provides useful methods
and class fields(out,in,err)for input and output.

out is print stream object.it is static, so can be called
by its class name(System.out)

println() is a print stream method that is already
overloaded for each and every thing.it directs the output
to console
 
Is This Answer Correct ?    2 Yes 0 No
Alok
 
Answer
# 9
System is a class made available by Java to let you
manipulate various operating system related objects. It's
part of java.lang namespace.

out, being one of those objects, is a static publicly
available object inside that class. The object itself,
representing standard output, is an instance of
java.io.PrintStream class. Standard output is, on most
operating systems, console output.

println is a method of java.io.PrintStream class that lets
you output some text into the stream and, as opposed to
print() method, gets you to the new line after the text.

Check out the source for more information.

[EDIT, answer to "Additional details"] You don't need to
import java.io.* because System is part of available to all
Java calls package java.lang (you don't need to import
that). Even though out is an instance of
java.io.PrintStream, it is still declared *inside* the
System class and therefore, you do not need to import java.io.

Of course, implementation of java.lang.System needs to
import java.io (and many other packages). You can see it in
the source:
 
Is This Answer Correct ?    1 Yes 0 No
Dheeraj Singh Rajput
 
Answer
# 10
System is a Predefined Class
Out is static field of System Class.
println is the method of PrintStream class which take
argument for print to it.

Am I Right?
 
Is This Answer Correct ?    1 Yes 0 No
Sadikhasan Palsaniya
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
what is the difference between a java object reference and c++ pointer?   4
What is meant by final class, methods and variables?   3
I have one Shopping cart application, i that i have selected some items, while clicking submit button by mistake i have clicked twice or trice, that time items are selected twice or trice. Actually i want only one copy of items but its selected twice or trice. So how can we avoid this problem? Honeywell 2
we cannot create an object of interface but we can create a variable of it   1
When is an object in the mean to garbage collection?   3
Difference between hashCode() & equals()? HCL 3
What is static and a non-static inner class?   3
Can an exception be rethrown? Wipro 4
When try and catch block is used ?   6
What is Three tier architecture. Can anyone explain with a Ordinary web application Project? (JSP,Servlets,JAVA,DAO) ? TCS 3
Why Java is not purely object oriented? Persistent 49
What is an array and a vector? How they different from each other?   4
 
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