import java.util.Scanner; class Practice { public static void main(String args[]) { System.out.println(\"Enter the number of treats you have:\"); Scanner
You are assigning the value true to enoughtreats.
Try using the equality operator rather than assignment:
if (enoughtreats == true) { ... }
or simply:
if(enoughtreats) { ... }