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 [पृष्ठ १३५]
