NegativeArraySizeException
KW.java
Output
kodingwindow@kw:~$ javac KW.java
kodingwindow@kw:~$ java KW -2147483648Exception in thread "main" java.lang.NegativeArraySizeException: -2147483648 at KW.main(KW.java:7) kodingwindow@kw:~$
Java program to handle the NegativeArraySizeException
KW.java
Output
kodingwindow@kw:~$ javac KW.java
kodingwindow@kw:~$ java KW Array underflow java.lang.NegativeArraySizeException: -2147483648 kodingwindow@kw:~$
What Next?
Java program to handle the OutOfMemoryError exception
Java program to handle divide by zero exception
Java Regular Expressions
Advertisement