|
Re: java.lang.ArrayIndexOutOfBoundsException: 0 [message #643192 is a reply to message #643082] |
Sun, 05 December 2010 22:40 |
Eclipse User |
|
|
|
Originally posted by: lhasadad.gmail.google.com
Check the length of the array before trying to reference an element in it. you probably started the program
with no arguments....
On 12/3/2010 8:23 PM, carter wrote:
> Hi Everybody!!!
> i'm new on java
> this code got it from the solutions of thinking in java
> I'm Trying to run this program and it just send me this Exception, i've tried to change my workspace to other place, reinstall eclipse and it keeps sending same exception any body have had
> same error? :( please help
>
>
>
> this is the exception eclipse send me when i run this program:
> Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
> at ShowArgs.main(ShowArgs.java:5)
>
> public class ShowArgs {
> public static void main(String[] args) {
> System.out.println(args[0]);
> System.out.println(args[1]);
> System.out.println(args[2]);
> }
> }
> i use:
> Eclipse SDK
> Version: 3.6.1
> Build id: M20100909-0800
>
> hope somebody can help me
> thank you verymuch
|
|
|
Powered by
FUDForum. Page generated in 0.03126 seconds