Java OCA OCP Practice Question 266

Question

When a negative byte is cast to a long, what are the possible values of the result?

  • A. Positive
  • B. Zero
  • C. Negative


C.

Note

When a numeric primitive is cast or converted to a wider type, the original value is preserved.

The original sign is changed.




PreviousNext

Related