A

Admin • 830.13K Points
Coach

Q. What is the output for the below code ?

Code:
public class Test
{
public static void main(String[] args)
{
byte b = 6;
b+=8;
System.out.println(b);
b = b+7;
System.out.println(b);
}
}
  • (A) 14 21
  • (B) 14 13
  • (C) Compilation fails with an error at line 6
  • (D) None of these
  • Correct Answer - Option(C)
  • Views: 13
  • Filed under category Java
  • Hashtags:

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.

Be the first to start discuss.