I'm getting a dead code warning in a for loop at i++. Why do I get that, and how do I solve this problem?
public static boolean Method(int p) {
for(int i = 2; i < p; i++) { // here is the problem, at i++
if(p % i == 0);
return false;
}
return true;
}
Anonymous User
21-Dec-2015