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


when i write
string s1="java";
in one program(application) and
string s2="java";
in another application
on the same jvm will both objects s2,s2 will refer to same
memory location where "java" is stored
in string pool.

Answers were Sorted based on User's Feedback



when i write string s1="java"; in one program(application) and string s2="java&q..

Answer / ss

String s1="java";
String s2="java";
System.out.println(s1.equals(s2)); -->true
System.out.println(s1==s2); --->true

Is This Answer Correct ?    6 Yes 3 No

when i write string s1="java"; in one program(application) and string s2="java&q..

Answer / tj

Yes,They will refer to same memory location..

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More Core Java Interview Questions

Is double bigger than float?

0 Answers  


What are the Abstract Classes provided by Java?

5 Answers   Oracle,


what is the significance of listiterator in java?

0 Answers   IBS,


What is purpose of keyword void?

0 Answers  


Why main method is static in java?

0 Answers  


How many types of memory areas are allocated by jvm?

0 Answers  


How do you check if a number is a perfect square?

0 Answers  


HOW TO PRINT A NO IN WORDS USING WHILE LOOP THE NO WILL BE PRINTED WHEN IT WILL BE IN THE RANGE BETWEEN 1 AND 3?

1 Answers  


What do you mean by Hash Map and Hash Table?

0 Answers   Atos Origin,


Do I need java on my pc?

0 Answers  


what is webservices

5 Answers   Consultancy, Mind Tree,


Is static a singleton?

0 Answers  


Categories