I currently have a list of numbers
the variable cube only has (approximately) 4 different numbers in it.int[][] cube = new int [56][3]; //numbers are input here
e.g. 1,1,1,5,5,5,2,2,5,2,2,1,1,1.
The numbers range from 0 to 1000.
I want to output the numbers, with no repeats.
e.g. 1,5,2.
I am currently using the code
Note. This code does not work how I want it to.int[][] cube = othermethod(args); int[][] temp = new int[32][3]; int counter; int reg=0; for(counter=0;counter<56;counter++){ if( temp[reg-1][0]==cube[counter][0]&& temp[reg-1][1]==cube[counter][1]&& temp[reg-1][2]==cube[counter][2]){ }else{ temp[reg][0]=cube[counter][0]; temp[reg][1]=cube[counter][1]; temp[reg][2]=cube[counter][2]; reg++;