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...

How many objects are created when we create String class
object using new operator?

Answer Posted / mahesh

yes two objects will be created when you use new operator
for a String. The reason for this is at first it creates an
object in HEAP and then verifies in the String Constant
Pooling if it is not available then creates the new one in
pool. so totally two object will be created.

Is This Answer Correct ?    22 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the static import?

1057


Can an interface extend a class?

930


What is difference between calling start() and run() method of thread?

1047


Can you call a method in a method?

1022


What is fail fast in java?

1075


How many times finalize method will be invoked? Who invokes finalize() method in java?

970


Is age a discrete variable?

924


What is meant by inheritance and what are its advantages?

1049


how can i use a nonsynchronized hashtable?

2535


What is a java lambda expression?

989


What is the generic function?

937


What is tree in java?

866


How does list work in java?

871


Can a variable be local and static at the same time?

949


What are parameters in a method?

1052