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 starvation?

797


What is matcher in java?

619


What is java argument list?

607


What is default exception handling in java?

645


What are different types of states exist for a thread?

652






What are different data types?

654


What is the difference between static (class) method and instance method?

660


explain different ways of using thread? : Java thread

648


Explain the difference between throw and throws in java?

636


What are the 5 types of research methods?

698


What is java autoboxing?

606


How many bits are used to represent unicode, ascii, utf-16, and utf-8 characters in java programming?

660


Can we use both this () and super () in a constructor?

648


What is difference between wait and notify in java?

648


Is null function in java?

676