System.out.println("somestring"); It will create any object
or not

Answers were Sorted based on User's Feedback



System.out.println("somestring"); It will create any object or not..

Answer / aslam

Yes, It will create PrintStream object

Is This Answer Correct ?    20 Yes 4 No

System.out.println("somestring"); It will create any object or not..

Answer / manish pal

yes it create 2 objects
first for string literal
second for print stream

Is This Answer Correct ?    10 Yes 0 No

System.out.println("somestring"); It will create any object or not..

Answer / rakesh

yes it can create

Is This Answer Correct ?    4 Yes 1 No

System.out.println("somestring"); It will create any object or not..

Answer / maulik

yes, it can create..

Is This Answer Correct ?    1 Yes 0 No

System.out.println("somestring"); It will create any object or not..

Answer / prajakta

yes...Here System is a pre-defined class & out is a static
variable of that class.So we use "System.out" i.e
(className.variableName)..which gives you printstream class
object..now that object is used to call non-static method
of printstream class(println)i.e. obj.methodName();

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

When do you call copy constructor?

0 Answers   Tavant Technologies, Virtusa,


Should a main method be compulsorily declared in all java classes?

0 Answers  


Why transient variables wont participate in serialization?

2 Answers  


Do we need to manually write Copy Constructor?

0 Answers   HCL,


What are the different data types in java?

0 Answers  






What is the abstraction?

0 Answers  


The class "Class" is belongs to which package?? a) java.lang b)java.lang.reflect c)java.util d)None

4 Answers  


What is the difference between member variables initialization and assignment in a constructor?

0 Answers   Hexaware, Virtusa,


Can private members of a base class are inheritable justify?

0 Answers  


What is final method?

0 Answers  


what is the difference between a java object reference and c++ pointer?

4 Answers  


What are synchronized blocks in java?

0 Answers  


Categories