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 is getkey () in java?
What is the diffrence between inner class and nested class?
Does substring create a new object?
How can you add and remove nodes in jtree?
What is private static class in java?
What do you understand by final value?
how to one war file class to another war file class?
Can a boolean be null java?
What do you mean by flow of struts?
What is the use of System class?
What is assembly language?
What are the elements of java?
What is meant by memory leak?
What is meant by distributed application? Why are we using that in our application?
What methodology can be employed to locate substrings inside a string?