class arrayLearn
{
public static void main(String args[])
{
//variables
int[200] elfSeniority;
//before changes
System.out.println("Before: " + elfSeniority[193]);
//change
elfSeniority[193] += 1;
//final result
System.out.println("After: " + elfSeniority[193]);
}//main
}//class
___________________________________________________
when trying to compile
C:\Users\Ateev\Desktop\arrayLearn.java:6: ']' expected
int[200] elfSeniority;
^
C:\Users\Ateev\Desktop\arrayLearn.java:6: not a statement
int[200] elfSeniority;
^
_____________________________________________________
Now i am just starting out in learning java.
i am having trouble learning arrays so my brother made this for me but i am not able to compile it, do you know what is wrong with it?
even without compiling this i am still not able to understand arrays?
{
public static void main(String args[])
{
//variables
int[200] elfSeniority;
//before changes
System.out.println("Before: " + elfSeniority[193]);
//change
elfSeniority[193] += 1;
//final result
System.out.println("After: " + elfSeniority[193]);
}//main
}//class
___________________________________________________
when trying to compile
C:\Users\Ateev\Desktop\arrayLearn.java:6: ']' expected
int[200] elfSeniority;
^
C:\Users\Ateev\Desktop\arrayLearn.java:6: not a statement
int[200] elfSeniority;
^
_____________________________________________________
Now i am just starting out in learning java.
i am having trouble learning arrays so my brother made this for me but i am not able to compile it, do you know what is wrong with it?
even without compiling this i am still not able to understand arrays?