rendered paste body//------------------------------- testklasse-------------------------------System.out.println(" "); int[] t = new int[7]; t[0] = 13; t[1] = 11; t[2] = 1; t[3] = 4; t[4] = 3; t[5] = 23; t[6] = 7; ArrayMetoder metode1 = new ArrayMetoder(); int ialt = metode1.sum(t); System.out.println(ialt); System.out.println(" ");//------------------------------- metodeklasse-------------------------------public int sum(int [] t){ int facit = 0; for(int i = 0; i< t.length; i++){ facit = facit + t[i]; System.out.println("I added " +t[i]+" and the result is "+facit); } return facit; }