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

Is main a keyword in java?

530


what is singleton class in java?

615


Give the hierarchy of inputstream and outputstream classes.

606


What is the difference between final, finally and finalize() in java?

510


What is the format specifier?

509






What are the differences between getting and load method?

534


Can a java program have 2 main methods?

541


What is meant by javabeans?

607


What are namespaces in java?

517


Why is logger singleton?

558


What are parameters in a method?

581


What is the lifetime and scope of a variable?

509


Is java util regex pattern thread safe?

510


Is string passed by reference in java?

541


What is java console application?

554