1).what is the difference between below examples
String s="vijay";
String s=new String("vijay");
Answer Posted / karun_cts
the two instances are created with the same name but one is
storing in constant pool and another one is saved in the
non constant pool.
Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What is the purpose of java?
When do we use synchronized blocks and advantages of using synchronized blocks?
what is deadlock? : Java thread
what is the difference between a threads start() and run() methods? : Java thread
What are the data types supported by java? What is autoboxing and unboxing?
What are the advantages of passing this into a method instead of the current class object itself?
Does java trim remove newline?
What is thread safe java?
Does substring create a new object?
What is the meaning of nullable?
Which is easier netbeans or eclipse?
What are different types of expressions?
Difference between string, string builder, and string buffer?
Can variables be used in java without initialization?
What is OOP's Terms with explanation?