-
Which of these exceptions will be thrown if we declare an array with negative size?
-
- NegativeArrayException
- NegativeArraySizeExeption
- IllegalArrayException
- IllegalArraySizeExeption
- None of these
Correct Option: B
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.