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 / vikneswarank
String s="java";
s.repalce('j','k');
System.out.println(s);
output is: java
because String is immutable.we cannt change of string
content.suppose u have to write
s=s.repalce('j','k');
output is :kava
Is This Answer Correct ? | 24 Yes | 3 No |
Post New Answer View All Answers
What is a map in java?
What is an example of a constant variable?
Is 9 a prime number?
How does arraylist work in java?
How do you sort a string in alphabetical order in java?
Explain differences between collection api and stream api?
Do I need java for windows 10?
What is exception hierarchy in java?
What is r * in math?
describe method overloading
Can I learn java in 3 months?
In which order the iterator iterates over collection?
What’s the difference between constructors and other methods?
Hi i am creating desktop application in that i want calling to mobile number. i have java telephone api (JTAPI) but i dont understand how it configure & use plese help me
Can I uninstall java?