// ArrayDemoSolution_7_1.java Copyright (c) 2006 Kari Laitinen // http://www.naturalprogramming.com // 2006-02-15 File created. // 2006-02-15 Last modification. class ArrayDemoSolution_7_1 { public static void main( String[] not_in_use ) { int[] array_of_integers = new int[ 50 ] ; int integer_index ; array_of_integers[ 0 ] = 333 ; array_of_integers[ 1 ] = 33 ; array_of_integers[ 2 ] = 3 ; array_of_integers[ 3 ] = array_of_integers[ 2 ] ; for ( integer_index = 4 ; integer_index < 50 ; integer_index ++ ) { array_of_integers[ integer_index ] = array_of_integers[ integer_index - 1 ] ; } System.out.print( "\n The contents of \"array_of_integers\" is:\n" ) ; for ( integer_index = 0 ; integer_index < 50 ; integer_index ++ ) { if ( ( integer_index % 10 ) == 0 ) { System.out.print( "\n" ) ; } System.out.printf( "%5d", array_of_integers[ integer_index ] ) ; } } }