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 / pradeep rout
public class Test {
public static void main(String args[])
{
String s="java";
System.out.println("Before>>>>>>>"+s);
s=s.replaceAll("j", "k");
System.out.println("After>>>>>>>"+s);
}
}
----------------------Output---------
Before>>>>>>>java
After>>>>>>>kava
Is This Answer Correct ? | 11 Yes | 1 No |
Post New Answer View All Answers
What are the two types of streams offered by java 8?
What is a type parameter in java?
Can I overload to string method
Is ruby built on java?
Why vector is used in java?
Why string is not thread safe?
What is object cloning in Java?
Explain about map interface in java?
Which is easier netbeans or eclipse?
Is java a compiler?
When should I use singleton?
What is unicode with example?
How will you reverse a link list without using recursion?
What are serialization and deserialization?
What is navigable map in java?