ICSE Class 10 Computer Applications Question 38 of 46

String Handling — Question 2

Back to all questions
2
Question

Question 2

While using the toLowerCase() method on a string containing special characters, ............... .

  1. the special characters remain unaffected.
  2. the special characters are converted to spaces.
  3. the special characters are converted to null character.
  4. the special characters are removed from the string.
Answer

the special characters remain unaffected

Reason — The toLowerCase() method converts each character in a string to lowercase. However, if the string contains any special character, it remains unchanged.