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 stream api in java8?

0 Answers  


What is java reflection?

0 Answers  


When can you say a graph to be a tree?

0 Answers   Amazon,


when there is a need of jvm then how we can say that java is a platform independent language?

3 Answers  


Can a top level class be private or protected?

0 Answers  


If you are given the name of the function at run time how will you invoke the function?

0 Answers   Adobe, Yahoo,


What is comparable and comparator interface? List their differences

0 Answers  


How to use string tokenizer class.

0 Answers  


What is OOPS Concept?

1 Answers   Cap Gemini,


Can we execute a program without main() method?

0 Answers  


How are java objects passed to a method and what are native methods?

0 Answers   Genpact,


What is the life cycle of Thread ?

12 Answers   HCL, Varnar Softech,


Categories