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 rule of accessibility in java?

1029


What is basic syntax?

1046


What is the purpose of java?

1013


What is the mapping mechanism used by java to identify IDL language?

1009


What is map and hashmap in java?

1067


Which variable is the independent variable?

984


What is the purpose of the system class in java programming?

1107


Define how objects are stored in java?

1068


Explain why wait(), notify() and notifyall() methods are in object class rather than in thread class?

1011


What is the differences between heap and stack memory in java? Explain

987


What is scanner in java?

955


What does the “static” keyword mean?

1107


What are the features of junit?

1045


How can I become a good programmer?

983


What is the use of singleton class?

971