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 is string :: npos?

803


How do you execute a thread in java?

735


Where pragma is used?

849


What are the limitations of procedural programming approach?

786


What is the difference between private & public & friendly classes?

822


Can we write any code after throw statement?

844


What sorting algorithm does javascript use?

775


What are the steps involved to create a bean?

915


Why super is first line in java?

846


What are the restrictions imposed on method overriding?

800


Difference between class#getinstance() and new operator ?

914


If a variable is declared as private, where may the variable be accessed?

833


Is final static java?

786


If an application has multiple classes in it, is it okay to have a main method in more than one class?

782


How do you write a conditional statement?

728