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 should I import for arraylist in java?

1034


Is treeset sorted in java?

988


Explain about method local inner classes or local inner classes in java?

1027


Distinguish between a predicate and a function?

987


What is byte code and why is it important to java’s use for internet programming?

1131


What does string [] args mean?

1014


How do you implement polymorphism in our day to day life?

3232


What happens if a constructor is declared private?

1036


What are the differences between include directive and include action?

1190


what is meant by encapsulation?

1083


When is the garbage collection used in Java?

1202


What are the different types of garbage collectors in java?

1141


Is string is a keyword in java?

976


Describe the syntax of multiple inheritance? When do we use such an inheritance?

1092


What is the java virtual machine?

1095