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

1).what is the difference between below examples

String s="vijay";

String s=new String("vijay");

Answer Posted / ravikiran

first one will create an object on the heap
second one will create two objects one will saved on the
heap and another will get saved on the string pool

Is This Answer Correct ?    0 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we need autoboxing in java?

989


What is wrapper class html?

936


What does the three dot emoji mean?

1116


What is a key in java?

977


What are the 6 mandatory procedures for iso 9001?

1028


Discuss about garbage collector in Java.

1073


What are the features in java?

1072


What is the relationship difference the canvas class and the graphics class?

1060


What is the difference between ArrayList and Vector? which one is better in Java

1130


What do you mean by constructor?

977


What is difference in between java class and bean?

1086


What does flag mean in java?

1021


can rmi and corba based applications interact ?

1076


What is the difference between abstract classes and interfaces?

1015


Why string is not thread safe?

1006