public class MultiplicationClass{
int answer;
int random;
int random2;
int create(){
random = (int)(1+Math.random()*15);
random2 = (int)(1+Math.random()*15);
return random;
return random2;
}
boolean checkAnswer(int useranswer){
if(useranswer==getAnswer()){
return true;
}else{
return false;
}
}
int getAnswer(){
return random*random2;
}
}
此代码总是给出错误:
unreachable statement in the line "return random2"