We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2886aea commit 8c52b69Copy full SHA for 8c52b69
java-multiple-choice-questions-answers.md
@@ -333,4 +333,19 @@ C. You can convert a wrapper class object to a primitive by calling valueOf().
333
D. You can store a primitive directly into an ArrayList.
334
```
335
B. You can convert a primitive to a wrapper class object simply by assigning it.
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
351
0 commit comments