EDIT: As per Brian's comment, the following problem is with the logic of the program:
for (int index=0; index<10; index++)
{
intArray[index] = 4*index+400;
index++; <--- this line here
}
Seems to be an unnecessary line incrementing the index variable. In Java the third part of the line for (int index=0; index<10; index++)
will increase the variable index by 1 at the end of each successful loop. You've got this in twice, which is probably not what you want
EDIT: This part:
ArrayList<Integer> intArray = new ArrayList<Integer>();
Should be:
List<Integer> intArray = new ArrayList<Integer>()
And place this at the start of public void demoArray4()
To add elements to the ArrayList use the .add(item) method:
intArray[index] = 4*index+400;
Should be :
intArray.add(4*index+400);