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
πŸ’¬ Discuss
βœ… Correct Answer: (C) The code does not compile.

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
444
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
93%
Success Rate