New course! Every coder should learn Generative AI!
Try a free lesson0
Which type of value is returned by replace() function
2 Answers
+ 2
answer is String
you can verify it using instanceof operator
e.g)String s = "hello world!!';
System.out.println(s.replace('l','#') instanceof String);//true
0
thank you