Java OCA OCP Practice Question 276

Question

Which of the following lists of primitive numeric types is presented in order from smallest to largest data type?

  • A. byte, short, int, long
  • B. int, short, byte, long
  • C. short, byte, int, long
  • D. short, int, byte, long


A.

Note

These four types represent non-decimal values.

While you don't need to know the exact sizes, you do need to be able to order them from largest to smallest.

A byte is smallest.

A short comes next, followed by int and then long. Therefore, Option A is correct.




PreviousNext

Related