i'm really new to java and greenfoot but how would i make this randomizer work
int AppleSpawn = Greenfoot.getRandomNumber(10) ;
if (AppleSpawn = 1)
## ill put code to do stuff here but that doesnt matter##
i just want a randomizer that is between 1 and 10 but if it lands on 11 it does something but it says "incompatible types int cannot be converted to boolean". by the way i know what a boolean is and kind of know what the error means but cant seem to fix it. help?


The '=' operator is for assignment, so "if (AppleSpawn = 1)" would always set AppleSpawn to 1; the error is because 1 is not a boolean. You want '==', to compare the current value with 1, which returns a boolean and so solves the error as well.
Finally, please note that by convention variable (and method) names in Java should begin with a lower-case letter - you should use 'appleSpawn' not 'AppleSpawn'. For class names, use an upper case character.