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

String is immutable.it is true
String can be change to mutable How?

Answer Posted / java

String s = "PROJECT";
String s2 = s.toLowerCase();

System.out.println(s.equals("PROJECT")); // Prints true
System.out.println(s.equals(s2)); // Prints false
In comparison, consider what would happen if Strings were mutable.

MutableString ms = "PROJECT";
MutableString ms2 = ms.toLowerCase();

System.out.println(ms.equals("PROJECT")); // Prints false
System.out.println(ms.equals(ms2)); // Prints true

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can constructors be synchronized in java?

1174


What value does read() return when it has reached the end of a file?

1076


difference between  ejb,struts,hibernate,spring and jsp

2922


What are local interfaces? Describe.

1304


What is the difference between session and entity beans?

1171


Is the infobus client side only?

1163


Explain about RMI Architecture?

1135


How would you detect a keypress in a jcombobox?

1187


What are the different algorithms used for clustering?

1129


Where can I ask questions and make suggestions about seam?

1112


Can I use javascript to submit a form?

1198


What is synchronization and why is it important?

1186


what is handle?

2421


In our urls and in the text of the buttons we have comma. Its causing an error. Is there a way to change the delimiting character for the menu arguments?

1222


Brief description about local interfaces?

1331