currently working on a project for college. when searching coffee names from the array list , it will only show the first object in the array list but when searching others, it says 'coffee not found' any help would be appreciated
public static void search () {
if (numberOfCoffees > 0) {
System.out.println ("search coffee");
System.out.println ("what are you searching for?");
String search = sc.nextLine();
int i = 0;
int o = 0;
String arrayName = coffee[i][0];
if (arrayName.equals(search)){
System.out.println("found: " + coffee[i][0] + " £" + coffee[i][1] );
} else {
System.out.println ("coffee not found");
}
} else {
System.out.println("there is no coffee in the list");
}
}