----------------------------------- Tat Fri Feb 06, 2004 4:51 pm [Tutorial] Arrays ----------------------------------- Arrays Most programming languages, including Java, provide a data structure called an array, which consists of an ordered collection of similar items. An array, as a whole, has a single name, and the items in an array are referred to in terms of their position within the array. If we needed to declare 20 tests you probably would do it like this: int test1, test2, test3, test4, test5, test6, test7, test8, test9, test10, test11, test12, test13, test14, test15, test16, test17, test18, test19, test20; All this work is not necessary, we could do it all in 1 small non confusing way with arrays like this: int[] tests = new tests[20]; To call on the first test you would call on tests[0], the second test you would call on test[1] and so on and up to the last test tests[19]. How would you call on all these tests, don't tell me you have to type tests[0], tests[1]"¦? You actually can do everything in a for loop, say I want to calculate the average of all these tests I would use: int sum=0; int avg; for(int i=0; i