मराठी

Which of the following returns a String? - Computer Applications

Advertisements
Advertisements

प्रश्न

Which of the following returns a String?

पर्याय

  • length()

  • charAt(int)

  • replace(char, char)

  • indexOf(String)

MCQ

उत्तर

replace(char, char)

Explanation:

The method replace(char oldChar, char newChar) returns a new String with all occurrences of oldChar replaced by newChar. This method does not modify the original string but produces a new one with the specified replacements.

shaalaa.com
String Array
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
2024-2025 (April) Specimen Paper
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×