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


Please Help Members By Posting Answers For Below Questions

What is the use of isempty in java?

531


What are scriptlets?

591


What is a consumer in java?

558


What is a condition in java?

528


What is JFC?

701






What variables are stored in stack?

523


How do you calculate roots in java?

519


Why are functions called methods in java?

518


What are the different ways of creating thread?

564


what are Hostile Applets?

1598


What is the difference between sop and work instruction?

476


What is ctrl m character?

510


Can we access the non-final local variable, inside the local inner class?

509


What is anonymous inner class?

607


How many types of interfaces are there?

568