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 |
How many characters is 2 bytes?
What are different type of exceptions in java?
Can we have this () and super () together?
Can two objects have same hashcode?
What are different types of inner classes ?
Why string is a class?
What is a void method java?
What is the final method?
Explain list interface?
What is the difference between stringbuffer and stringbuilder?
Can you explain the final method modifier?
Can variables be used in java without initialization?