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

What is autoboxing and unboxing?

0 Answers  


Why you should not use singleton?

0 Answers  


Difference between abtsract & final

1 Answers   Nous,


What is stream api in java8?

0 Answers  


Why does java not support operator overloading?

0 Answers  






What is pangram in java?

0 Answers  


What is an abstract class?

7 Answers   DBS, Wipro,


What are the actions that can occur when a thread enters blocked state?

0 Answers  


Difference between canvas class & graphics class?

1 Answers  


in a constructor what happen if u call super and this in the same class? i know that it is not possible to call both in the same one? if we call what will happen?

10 Answers   ITC Infotech,


Can we use catch statement for checked exceptions when there is no chance of raising exception in our code?

0 Answers  


can we have virtual functions in java?

11 Answers   Wipro,


Categories