Java Interview Questions
Can you pass the negative number as an array size?
No. You can’t pass the negative integer as an array size. If you pass, there will be no compile time error but you will get NegativeArraySizeException at run time.