I tried to make a number randomization system for my text game, but I want to make it so that there are more than two probabilities, like if(rand.nextInt(100) <= 25, and after that I would put something like this, if(rand .nextInt(100) >= 26 && <= 75, however eclipse says that I cannot use && in a Boolean code or int code and also tells me to delete the <=, how do I do something like that without giving an error?
I tried to make the code using &&, expecting that with this I could make more tham 3 probabilities, but it didn’t work how i was expecting and keeps saying that I can’t use &&.
PEDRONES JF is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.