//Name: Ilana Levy //Period: 5 //Program Name: Arrays with For Loops //File Name: arraysFor.java //Date Finnished: 5/31/2016 public class arraysFor{ public static void main( String[] args ){ int sample[] = { 1, 2, 3, 4, 5 }; int sum = 0; for ( int i = 0; i < sample.length; i++ ){ sum = sum + sample[i]; } System.out.println("The sum is: " + sum); for (int each: sample){ System.out.print( sample[ 5 - each]); } System.out.println(); } }