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 / prabhavith

replaceAll take two strings as parameter
but in the given question characters are given as parameter
hence it is an error

Is This Answer Correct ?    5 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the object and class classes used for?

567


What is generic class?

652


How will you communicate between two applets?

636


What is slash r?

545


Define interface in java?

609






Can a boolean be null java?

545


Is a method a procedure?

559


How do you start a thread?

554


What is the purpose of garbage collection in java? When is it used?

543


What is an empty string in css?

537


What will happen if there is a default method conflict as mentioned above and we have specified the same signature method in the base class instead of overriding in the existing class ?

522


What happens when you invoke a thread’s interrupt method while it is sleeping or waiting?

580


What is class forname used for?

543


What is r in java?

595


what is collatration?

2745