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 an array in java?

1279


How many types of gc are there in java?

1039


What is java util list?

1024


Is assembly language a low level language?

1013


Why does java have different data types for integers and floating-point values?

1061


What is an empirical question?

1017


is it possible to instantiate the math class?

1089


What do you mean by constant time complexity?

1328


How we can execute any code even before main method?

1185


How to convert string to char and vice versa?

1048


Explain the difference between private, public, package and protected in java?

1089


What does index mean in java?

1034


What is the null?

1054


Explain about the main() method in java?

1168


Is string is a class in java?

1016