Advertisements
Advertisements
प्रश्न
The output of the statement:
System.out.println(Character.toUpperCase('b')+2); is:
विकल्प
66
100
68
98
MCQ
Advertisements
उत्तर
68
Explanation:
The function Character.toUpperCase('b') converts the lowercase character ‘b’ to uppercase ‘B’. In Java, the ASCII value of the uppercase character 'B' is 66. When an integer is added to a character (66 + 2), Java performs numeric addition, resulting in 68.
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
2025-2026 (March) Official Board Paper
