1).what is the difference between below examples

String s="vijay";

String s=new String("vijay");

Answer Posted / uday

Hi All,
Here one object is stored in the heap and you said that
you can change that, but bydefault String objects are
immutable(ReadOnly), how can u change it?

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are the disadvantages of indexes in oracle?

1850


Can we increase array size dynamically in java?

489


What is independent and dependent variables in research?

458


What is a function easy definition?

511


How do you square a number?

564






Is array a class in java?

490


How to make a class or a bean serializable?

530


Explain jdk, jre and jvm?

554


What does substring mean?

492


What is the use of isempty in java?

525


What is unicode with example?

601


Explain about interrupt() method of thread class ?

645


Why java is platform independent? Explain.

586


What are serialization and deserialization?

704


Is java hard to learn?

450