R

Ram Sharma • 193.86K Points
Coach

Q. What is the output of the following?

Code:
Integer integer = new Integer(4);
System.out.print(integer.byteValue());
System.out.print("-");
int i = new Integer(4);
System.out.print(i.byteValue()
  • (A) 4-0
  • (B) 4-4
  • (C) The code does not compile.
  • (D) The code compiles but throws an exception at runtime
  • Correct Answer - Option(C)
  • Views: 338
  • Filed under category JAVA

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.


Question analytics