Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

difference between String a; and String a=new String();?
y do v need to assign memory to the variable?

Answer Posted / janardhan

String a; :---

JVM will create String object in SCPM(String constant pool
memory)only.

String a=new String();:---

JVM will create String object in two memories
1. Heap memory
2. String constant pool memory.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is OOP Language?

1020


What is the purpose of using bufferedinputstream and bufferedoutputstream classes?

1028


Is null an object java?

929


Explain OOPs concept.

1045


What is the difference between an interface and an abstract class?

948


Why do we need wrapper class?

940


What are different types of inner classes ?

986


What is object-oriented programming?

1026


What is the point of java?

968


What is a ternary operator in java?

941


What is boolean false?

929


What is a void method?

880


Is overriding possible in java?

901


Explain about anonymous inner classes in java?

1000


List out benefits of object oriented programming language?

832