Java OCA OCP Practice Question 278

Question

What is the difference between the rules for method-call conversion and the rules for assignment conversion?

  • A. There is no difference; the rules are the same.
  • B. Method-call conversion supports narrowing, assignment conversion does not.
  • C. Assignment conversion supports narrowing, method-call conversion does not.
  • D. Method-call conversion supports narrowing if the method declares that it throws ClassCastException.


A.

Note

Method-call conversion and assignment conversion are governed by the same rules.




PreviousNext

Related