1,HTML source code£º <html> <head> <title>How to use ArrayIndexOutOfBoundsException</title> <script src="jsjava.js"></script> </head> <body> <script> function getValue(arr,index){ if(index>=arr.length){ throw new ArrayIndexOutOfBoundsException(ArrayIndexOutOfBoundsException.ERROR,""); } } var arr=["a","b"]; try{ var value=getValue(arr,3); }catch(e){ document.write(e.name); } </script> </body> </html> 2,The display:

jsjava.lang.ArrayIndexOutOfBoundsException