Skip to content

Commit 8c52b69

Browse files
committed
Update java-multiple-choice-questions-answers.md
1 parent 2886aea commit 8c52b69

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

java-multiple-choice-questions-answers.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,4 +333,19 @@ C. You can convert a wrapper class object to a primitive by calling valueOf().
333333
D. You can store a primitive directly into an ArrayList.
334334
```
335335
B. You can convert a primitive to a wrapper class object simply by assigning it.
336-
```
336+
```
337+
#### Q. What is the output of the following?
338+
```java
339+
Integer integer = new Integer(4);
340+
System.out.print(integer.byteValue());
341+
System.out.print("-");
342+
int i = new Integer(4);
343+
System.out.print(i.byteValue());
344+
```
345+
A. 4-0
346+
B. 4-4
347+
C. The code does not compile.
348+
D. The code compiles but throws an exception at runtime
349+
```
350+
C. The code does not compile.
351+
```

0 commit comments

Comments
 (0)