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.

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a condition in programming?

958


Why java is not 100% object-oriented?

1431


do I need to use synchronized on setvalue(int)? : Java thread

957


What does the exclamation mark mean in java?

1168


Java is Pass by Value or Pass by Reference?

994


Do loops java?

961


What do you understand by the term string pool?

957


Why is java not 100% pure oops?

1079


What is string subsequence method?

1068


What is the difference between static class and normal class?

979


What is scope & storage allocation of static, local and register variables? Explain with an example.

962


Difference between string s= new string (); and string s = "abv";?

1158


What is the use of :: in java?

957


What is implicit object in java?

1022


what do you understand by synchronization? : Java thread

939