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 |
When do you call copy constructor?
0 Answers Tavant Technologies, Virtusa,
Should a main method be compulsorily declared in all java classes?
Why transient variables wont participate in serialization?
Do we need to manually write Copy Constructor?
What are the different data types in java?
What is the abstraction?
The class "Class" is belongs to which package?? a) java.lang b)java.lang.reflect c)java.util d)None
What is the difference between member variables initialization and assignment in a constructor?
Can private members of a base class are inheritable justify?
What is final method?
what is the difference between a java object reference and c++ pointer?
What are synchronized blocks in java?