Which type of value is returned by replace() function | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Which type of value is returned by replace() function

22nd Dec 2018, 6:18 PM
bhavya bhatia
bhavya bhatia - avatar
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
22nd Dec 2018, 7:45 PM
Rishi Anand
Rishi Anand - avatar
0
thank you
22nd Dec 2018, 11:55 PM
bhavya bhatia
bhavya bhatia - avatar