Vidyalelo
Java Programming · Q21

Java Autoboxing

Programming · Java Programming · question 21

Q21

What is the result of the following code in Java? Integer num = null; int result = num + 5;

A.
`5`
B.
`null`
C.
`Compilation error`
Answer
D.
`Runtime error`

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board