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 the difference between length and size in java?

940


What is meant by class loader? How many types are there?

1190


How do you input a string in java?

1005


What are abstract classes and anonymous classes?

1030


explain the concept of virtual method invocation in polymorphism in detail?

2162


What are different types of multitasking?

913


What are voids?

922


Explain the difference between abstract classes and interfaces in java?

1103


What is an example of a boolean?

1006


worst case complexities of Quick sort and Merge sort.

953


What is the difference between the boolean & operator and the && operator in java programming?

998


What is an interface in java?

1010


Can a string be null?

933


Explain the usage of this with constructors?

983


Is a case study a method or methodology?

854