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");

Answers were Sorted based on User's Feedback



1).what is the difference between below examples String s="vijay"; String s=new Stri..

Answer / 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

1).what is the difference between below examples String s="vijay"; String s=new Stri..

Answer / p.sreekiran

in first string class it create in heep memory and second
is created object in constant memeory we cannot change the
second one

Is This Answer Correct ?    2 Yes 13 No

Post New Answer

More Core Java Interview Questions

What is the function of static in java?

0 Answers  


What is data string?

0 Answers  


What is variable explain with example?

0 Answers  


What is the use of string and stringbuffer?

0 Answers  


How transient variable is different from volatile variable?

0 Answers  


What happens if an exception is throws from an object's destructor?

0 Answers   Amazon,


Is arraylist sorted in java?

0 Answers  


What is a local class in java?

0 Answers  


Can we override constructor?

0 Answers  


Explain about GridBag Layout?

1 Answers  


Which is not Object in Java?

10 Answers   Honeywell,


Define package in Java.

1 Answers  


Categories