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
what is enumset?
How do you initialize an arraylist in java?
What are the methods of object class ?
Can you run java program without main method?
What is the use of static class?
Is it possible to specify multiple jndi names when deploying an ejb?
Is array a class in java?
What are the advantages of functions?
What is the internal implementation of set in java?
Explain java coding standards for constants?
What is string in java is it a data type?
Explain the purpose of garbage collection in Java?
I want to store more than 10 objects in a remote server? Which methodology will follow?
What is double parsedouble in java?
Which is bigger float or double?