+ 2
What's wrong? It keeps giving me errors?
double possibility; if(possiblity > 0 || possiblity = 0){ return "possible"; } else{ return "can't be done"; }
4 Respuestas
+ 31
1. I think the "possibility" variable should be initialized.
2. Wrong condition. Must be like this:
if(possiblity > 0 || possiblity == 0)
+ 10
check assignment vs evaluating equality
= vs ==
+ 9
When checking for equals in an if statement, use ==, not =.
double possibility;
if(possiblity > 0 || possiblity == 0){
return "possible";
}
else {
return "can't be done";
}
+ 4
thanks I absolutely forgot