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 are the three parts of a lambda expression? What is the type of lambda expression?

0 Answers  


What is java beans?

0 Answers  


What is the difference between getCodeBase and getDocumentBase methods?

1 Answers   CS Business Services,


Catch(Exception e){ } in that what is Exception and purpose of that in that place exactly?

3 Answers  


what is the final keyword denotes in java?

0 Answers   IBS,


How list contains works in java?

0 Answers  


What is string intern in java?

0 Answers  


Hi friends, i am new to java. can you explain how java is secured.

2 Answers  


How many ways can we create the string object?

0 Answers  


What is use of static method?

0 Answers  


Tell me how many ways are there to initialise an integer with a constant.

0 Answers   Aricent,


What is Three tier architecture. Can anyone explain with a Ordinary web application Project? (JSP,Servlets,JAVA,DAO) ?

3 Answers   TCS,


Categories