Java OCA OCP Practice Question 165

Question

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

  • A. byte, char, float, double
  • B. byte, char, double, float
  • C. char, byte, float, double
  • D. char, double, float, bigint


A.

Note

A byte is smaller than a char, making Option C incorrect.

bigint is not a primitive, making Option D incorrect.

A double uses twice as much memory as a float variable, therefore Option A is correct.




PreviousNext

Related