Q. Which exception is thrown when a method is called with incorrect arguments?

A
NullPointerException
B
IllegalArgumentException
C
ArrayIndexOutOfBoundsException
D
ClassCastException
Solution:

IllegalArgumentException is thrown when a method receives an argument that it cannot handle.

Entri Contact Image

Get Expert Advice for Free: Register for Your Free Consultation Now!