View Single Post
  #2 (permalink)  
Old 01-20-2008, 10:43 PM
hardwired hardwired is offline
Senior Member
 
Join Date: Jul 2007
Posts: 1,222
hardwired is on a distinguished road
Code:
public class Test { public static void main(String[] args) { printDoubleArray(); } public static void printDoubleArray() { int[] array1 = new int[4]; // for (int i=0; 1 <4; i++) // typo for (int i=0; i <4; i++) { array1[i] = i * 2; } double[] lijst = {1.4, 3.3, 6.7}; for (int i=0; i <4; i++) { System.out.print(i + ". (" + array1[i]); if(i < lijst.length) System.out.print(", " + lijst[i]); System.out.print(")"); System.out.println(); } } }
Reply With Quote