1).what is the difference between below examples
String s="vijay";
String s=new String("vijay");
Answers were Sorted based on User's Feedback
Answer / ravikiran
first one will create an object on the heap
second one will create two objects one will saved on the
heap and another will get saved on the string pool
Is This Answer Correct ? | 0 Yes | 6 No |
Answer / p.sreekiran
in first string class it create in heep memory and second
is created object in constant memeory we cannot change the
second one
Is This Answer Correct ? | 2 Yes | 13 No |
What is meant by polymorphism?
What are access specifiers in java ?
0 Answers Akamai Technologies,
What are the differences between stringbuffer and stringbuilder?
What does n mean?
What is keyword auto for?
How finally used under exception handling?
Explain method overloading and overriding?
What are the benefits of operations in java?
Can we use a switch statement with strings?
What is an off by one error in java?
What is lambda in java?
Write program to print Hello World and print each character address in that string and print how many times each character is in that string? Ex: H: 0 & 1 e:1 & 1 l :2,3,8 & 3 o:4,6 & 2 w:5 & 1 r: 7 & 1 d 9 & 1