What will be the output of the following Java method?

ICSE Class 10 Computer Applications PYQ · 2025 Improvement · Section A

1(x)1 Mark · 2025 · Section A · 2025 Improvement

What will be the output of the following Java method?

Character.isLetterOrDigit('\n')
Show SolutionHide Solution↓

false

Reason — The method Character.isLetterOrDigit('\n') checks whether the given character is a letter or a digit. The character '\n' represents a newline, which is neither a letter nor a digit, so the method returns false.

← Previous questionNext question →

Browse the free Computer Applications sample bank