मराठी

Write the output of the following. boolean b3 = Character.isWhitespace('\n'); System.out.println(b3);

Advertisements
Advertisements

प्रश्न

Write the output of the following.

boolean b3 = Character.isWhitespace('\n');

System.out.println(b3);

अति संक्षिप्त उत्तर
Advertisements

उत्तर

true

Explanation:

The method Character.isWhitespace('\n') checks whether the given character counts as blank space. Because '\n' represents the newline character (which creates a blank line space when you press Enter), Java classifies it as a whitespace character, evaluating the expression to true.

shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 5: Library Classes - Exercises [पृष्ठ १३५]

APPEARS IN

रूपा पंडित Computer Applications [English] Class 10 ICSE
पाठ 5 Library Classes
Exercises | Q 5. (iii) | पृष्ठ १३५
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×