1).what is the difference between below examples
String s="vijay";
String s=new String("vijay");
Answer Posted / karun
In first statement String s = "vijay"
Means it will create a single instance and single reference
variable
but in second statement
String s = new String("vijay");
Means it will create a two instances and single reference
variable
| Is This Answer Correct ? | 4 Yes | 7 No |
Post New Answer View All Answers
Define "Access specifiers" in java.
What are the steps involved to write rmi based programs?
Write a code to create a trigger to call a stored procedure
What is class and object in java?
what is the difference between process and thread? : Java thread
What is JFC?
What is nan inf?
What about static nested classes in java?
Is void a keyword in java?
Explain the difference between an Interface and an Abstract class?
How will you add panel to a frame?
Is java a utf 8 string?
How do you override a method in java?
java program with complete 4 oops concepts implemented example
What is the base class of all exception classes in java?