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
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  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