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

Compile time error error.
String s=java here double quotes missing
and s.replaceAll('j','k'); here also we have to give double quotes.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the main differences between notify and notifyAll in Java?

583


Explain different types of wrapper classes in java?

601


Enlist diffrent types of inheritance supported by java?

484


What is the use of volatile in java?

601


what is comparable and comparator interface?

581






How do you sort a string in java?

539


How static variable work in java?

600


when you will synchronize a piece of your code? : Java thread

529


Can we create a constructor in abstract class?

574


Compare java and python.

581


What is basic syntax?

551


What is object data type?

569


What is the base class of all exception classes?

585


Give differences between Quicksort &Mergesort. When should these sorts be used andwhat is their running time in java?

678


What is an class?

593