Advertisements
Advertisements
Question
Which of the following occupies 2 bytes of storage?
Options
25
AM
35.2
\\
MCQ
Fill in the Blanks
Advertisements
Solution
\\
Explanation:
The backslash here is a single character (a char), and in Java, a char uses 2 bytes (16 bits). The literal 25 is an int (4 bytes), 35.2 is a double (8 bytes) and “AM” is two chars (2 × 2 = 4 bytes).
shaalaa.com
Is there an error in this question or solution?
2025-2026 (March) Official Board Paper
