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 is array command?

806


How do you check if an arraylist is not empty?

790


What is the difference between the direct buffer and non-direct buffer in java?

783


What is return used for in java?

732


What is the purpose of garbage collection in java?

846


What are the different data types in java?

749


Can we declare a static variable inside a method?

739


Why does java does not support multiple inheritance? Explain

742


Is int primitive data type?

741


What is the static import?

824


Describe what happens when an object is created in java ?

773


What is a stringbuffer?

746


What is the gregoriancalendar class in java programming?

784


Why are variables important in research?

736


Realized?

1907