-
Which of these exceptions will be thrown if we declare an array with negative size?
-
- NegativeArrayException
- IllegalArrayException
- NegativeArraySizeExeption
- IllegalArraySizeExeption
- None of these
Correct Option: C
Array size must always be positive if we declare an array with negative size then built in exception “NegativeArraySizeException” is thrown by the java’s run time system.