Return max value of the table
807601Feb 22 2008 — edited Feb 22 2008Hi I'm trying to get the max value of my table, my code doesn't work :(
public static void GetMaxMax(int[]tobi){
int max = 0;
for (int i = 0; i < tobi.length-1; i++){
if (tobi[i] > tobi[i+1])
max = tobi;
}
System.out.println("the max value is: "+max);
}