다음과 같이 argument 값을 넘겨주지 않아서 오류발생 한경우 

ArrayIndexOutOfBoundsException 에러

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
at polymorphism.TvUser.main(TvUser.java:8)  


프로젝트 우클릭 > Run As > Run Configurations >  Arguments 에 입력후 Apply , Run

명령형매개변수 설정하기

 

명령형매개변수 설정하기

정상실행

+ Recent posts