java.lang.ArrayIndexOutOfBoundsException: 0 I ran this code thru IDE.My questions are 1) args is not null then what object it has ? 2) basic for loop causes runtime error then why enhanced for loop doesn't ?

Coderanch | meeta gaur | 3 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    args

    Coderanch | 3 years ago | meeta gaur
    java.lang.ArrayIndexOutOfBoundsException: 0 I ran this code thru IDE.My questions are 1) args is not null then what object it has ? 2) basic for loop causes runtime error then why enhanced for loop doesn't ?

    Root Cause Analysis

    1. java.lang.ArrayIndexOutOfBoundsException

      0 I ran this code thru IDE.My questions are 1) args is not null then what object it has ? 2) basic for loop causes runtime error then why enhanced for loop doesn't ?

      at TestArray.main()
    2. Unknown
      TestArray.main
      1. TestArray.main(TestArray.java:11)
      1 frame