1).what is the difference between below examples

String s="vijay";

String s=new String("vijay");

Answer Posted / ramya

as kiran said in the first answer that the string created
in the heap memory can be changed,is it that the memory in
the heap can be changed.I read it as heap provides a stable
storage.Please clarify.Thanks in advance.

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is hashmap and map?

563


Why is string buffer better than string ?

605


What is the similarity between dynamic binding and linking?

615


What are the advantages of functions?

525


What is a dynamic array in java?

567






What is the mapping mechanism used by java to identify IDL language?

593


a thread is runnable, how does that work? : Java thread

515


What is integer valueof?

645


Mention the default values of all the elements of an array defined as an instance variable.

527


Explain the difference between serializable and externalizable in java?

543


how to deploy apache tomcat server to weblogic server in java

1600


These static constructors are correct ? class A { statc intA() { } static A(int x,int y) { } static A(int x) { } }

604


What is number data type in java?

560


Why destructor is not used in java?

526


What is the association?

557