System.out.println("somestring"); It will create any object
or not
Answers were Sorted based on User's Feedback
Answer / manish pal
yes it create 2 objects
first for string literal
second for print stream
Is This Answer Correct ? | 10 Yes | 0 No |
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 |
What is autoboxing and unboxing?
Why you should not use singleton?
Difference between abtsract & final
What is stream api in java8?
Why does java not support operator overloading?
What is pangram in java?
What is an abstract class?
What are the actions that can occur when a thread enters blocked state?
Difference between canvas class & graphics class?
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?
Can we use catch statement for checked exceptions when there is no chance of raising exception in our code?
can we have virtual functions in java?