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 does java ide mean?
What is derived datatype?
What is multithreading in java?
What is bigger kb or mb?
How can you share data between two thread in Java?
If we don’t want some of the fields not to serialize how to do that?
Why stringbuilder is not thread safe?
Where are global variables stored?
What are packages in java?
What is return type in java?
Justify your answer that you can't define a method inside another method in java, if you can then how?
What is a double vs float?
how to open and edit XML file in Weblogic???
What is a java developer salary?
Can a string be null?