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

When will we use them?

578


What is meant by 'bit masking' in java?

632


What is the importance of main method in Java?

561


Does set allows null in java?

495


How can we access some class in another class in java?

533






What are the special characters?

521


Why java is considered as platform independent?

575


Describe what a thread-local variable is in java?

553


Mention a package that is used for linked list class in java.

512


What is ide with example?

531


What is strings in java?

571


What is a void in java?

566


Is java same as core java?

578


What is an iterator java?

516


What is skeleton and stub? What is the purpose of those?

528