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 a immutable objects . it means that string does
not change...........
But it will be chang.........
{
String s="kapil";
String s1="raj";
String s=s1;
then print(.......)
The String has been changed ..
how it is possible and why its called immutable objects

Answer Posted / ramaraju

hi

String is a Immutable object,that is
string is an object not a datatype variable.

From the above example

String s=s1 //means it will create a new objet s with the
value raj,not change the value.

Note:whenever u edit or concatinate the string internally
it will create a new object,but not chang that object.

Is This Answer Correct ?    16 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between final and effectively final ? Why is effectively final even required ?

975


Differentiate between vector and array list.

1048


What is the major advantage of external iteration over internal iteration?

1093


what is object-oriented programming in java?

1034


how to write a server program and sending the mails to the server using smtp protocol please help me

2048


what is the constructor and how many types of constructors are used in java?

990


How do you do exponents in java?

1028


What is the difference between a method and a procedure?

1049


How to display all the prime numbers between 1 and 100

1003


What is the integer of 16?

953


What is quick sort in java?

990


Which collections are thread safe in java?

918


Explain about main() method in java ?

1044


What do you understand by the term singleton?

980


What is Java Shutdown Hook?

1175