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
Difference between a process and a program?
What is the difference between jdk and jre?
How many types of memory areas are allocated by jvm?
How do you find the independent variable?
What is singleton class in java and how can we make a class singleton?
What is meant by class loader? How many types are there?
What is the output of the below java program?
What does null mean in java?
What checkbox method allows you to tell if a checkbox is checked?
Define jit compiler?
If a class is declared without any access modifiers, where may the class be accessed in java programming?
What is the definition of tree ?
How will you initialize an Applet?
What is meant by final class?
Does .length start 0 java?