NEED HELP PLZ!!!
so in my code i need to make it that it prints the larger number but it always print the small one i check and all my friend got it right and i got the same code this is the structure public class AlgFindGreatestValue { public static void main (String arg[]) { int [] dan = {150,250,350,450}; int greater = 0; int index = 0; int size = dan.length; System.out.println("SEARCH ALGORITHM"); System.out.println("FIND THE GREATEST VALUE"); System.out.println(dan[0]); greater = dan[0]; size = size -1 ; while ( index < size ); { index = index +1 ; System.out.println(dan[index]); if ( dan [index]> greater) { greater = dan [index]; } } System.out.println("The highest is: "+" "+greater); } }