Exception in thread “main” java.lang.ArrayIndexOutOfBoundsException: 0 error in Java

前端 未结 8 2094
清酒与你
清酒与你 2021-01-07 05:52

When i tried running this code I get this error..I dont know where i went wrong..

Exception in thread \"main\" java.lang.ArrayIndexOutOfBoundsException: 0
           


        
8条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-07 06:01

    To check the args you should use args.length - not reference the index explicitly

提交回复
热议问题