Home / Programming MCQs / JAVA MCQs / Question

R

Ram Sharma • 188.81K Points
Coach

Q. What is the output of Java code snippet?

Code:
short k=1;
k += 2;
System.out.println(k);
(A) 1
(B) 2
(C) 3
(D) Compiler error about Type Casting

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.