Which of the following is true about primitives?
valueOf()
. B.
Option B is an example of autoboxing.
Java will automatically convert from primitive to wrapper class types and vice versa.
Option A is incorrect because you can only call methods on an object.
Option C is incorrect because this method is used for converting to a wrapper class from a String.
Option D is incorrect because autoboxing will convert the primitive to an object before adding it to the ArrayList.