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

I have a String s = java; What is the output when I say
s.replaceAll('j', 'k'); Also what is the value of s after
replacing?

Answer Posted / puneet

No, the strings are immutable; the value of s will be the
same but new object kava will get crated which wil have no
refrence. s will refer to the same object which is not
changed.
s=s.replace("",""); should have worked...otherways

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is enumset?

1042


How do you initialize an arraylist in java?

975


What are the methods of object class ?

997


Can you run java program without main method?

1016


What is the use of static class?

1083


Is it possible to specify multiple jndi names when deploying an ejb?

938


Is array a class in java?

924


What are the advantages of functions?

869


What is the internal implementation of set in java?

881


Explain java coding standards for constants?

952


What is string in java is it a data type?

949


Explain the purpose of garbage collection in Java?

971


I want to store more than 10 objects in a remote server? Which methodology will follow?

3123


What is double parsedouble in java?

958


Which is bigger float or double?

919