Java OCA OCP Practice Question 307

Question

Which converts a primitive to a wrapper class object without using autoboxing?

  • A. Call the asObject() method
  • B. Call the constructor of the wrapper class
  • C. Call the convertToObject() method
  • D. Call the toObject() method


B.

Note

Each wrapper class has a constructor that takes the primitive equivalent.

The methods mentioned in Options A, C, and D do not exist.




PreviousNext

Related