Learning Plan 5 Arrays
Arrays A variable stores ones value An array is just like a variable, but can hold more than one value
Arrays Int[] sale = new int[20]; sale[0] = 20000; sale[1] = 30000; .. System.out.println(sale[0]); System.out.println(sale[19);
Using Loops with Arrays Int[] sale = new int[20]; sale [0] = 20000; sale [1] = 30000; .. Sale[19] = 190000; For (int i = 0; I < 20; i++) { System.out.println(sale[i]); }
Real World Array Application Amazon - searches online database of products Results are returned in form of an array Programmatically loop through results and display products