This seems to work fine for me...
boolean more = true;
while (more) {
System.out.print("Do you have any more purchases Y/N?: ");
String any1 = scan.nextLine();
System.out.println();
if (any1.equalsIgnoreCase("y")) {
more = true;
} else {
more = false;
}
System.out.println(more);
}
Which kind of freaks me out cause I'm sure there's not that much difference
while(more==true)
is not required while(more)
says the same thing.
if(any1.equals("y") || any1.equals("Y"))
is not required, if (any1.equalsIgnoreCase("y"))
will do the same thing