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 rule of accessibility in java?

543


How do you escape in java?

579


What are the restrictions that are applied to the java static methods?

532


What super () does in java?

486


Explain about map interface in java?

595






What is io stream in java?

519


What is java autoboxing?

539


What is the static keyword?

592


What are the benefits of java?

573


Can an integer be null java?

555


Explain the reason behind ending a program with a system.exit(0)?

600


What do you understand by overloading and overriding in java?

546


What is a null check?

537


What is the file type?

557


What do you mean by mnemonics?

534