<!--StartFragment-->

제가 임의로 ArrayIndexOutOfBoundsException에러를 발생시키고싶은데요

 

동적할당된 배열 x [ ] 가 20이넘어가면 <!--StartFragment-->

ArrayIndexOutOfBoundsException에러가 나오게하고싶은데

어떻게 구현해야할까요;;

 

if (x==20){

//throw  ArrayIndexOutOfBoundsException

}