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 / nikhil hegde
when u say s.replaceAll('j','k') their will be no output but
internally the string s will be stored as kava. so when u
ask for the output the output will be kava
| Is This Answer Correct ? | 3 Yes | 5 No |
Post New Answer View All Answers
What is complexity and its types?
What is remote method invocation (rmi)?
Can an object be null?
What are the types of inner classes (non-static nested class) used in java?
What is the most important feature of java? What is an interface?
What is the use of static methods?
How do I convert a string to an int in java?
What does 0 mean in boolean?
How do you include a string in java?
How can I debug the Java security exceptions and AccessControlExceptions?
Write a program to find the whether a number is an Armstrong number or not?
What is the difference between stringbuffer and stringbuilder?
What is stack explain?
How would overload a function based on return type?
Discuss different types of errors that generally occur while programming.