QuestionQ32

Working with Java Data Types

Given the following:

Question Image

What is the outcome?

  • A Compilation fails.
  • B there
  • C hello
  • D A NumberFormatException is thrown.
Explanation

0b1101_1010 is an int binary integer literal (decimal 218). The print(int) overload is selected, so the program prints hello.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!