Android

인텔리제이 JAVA try catch (예외처리)

public class javastudy {
public static void main(String[] args) {


int intarray []= new int[5]; //012345

try
{
intarray[3] = 10;
intarray[6] = 1; //인덱스 초과 할당 
}
catch (Exception e) // try 문 오류시 실행
{
e.printStackTrace(); //문제 찾기
System.out.println("배열 범위 초과");
System.exit(0);

}

System.out.println("프로그램이 끝났어요");


}
}