在方法
promCommif
answer中,
false该方法不返回任何值。如果相同
randQuest.nextInt(1) != 0.
应该是这样的:
public String promComm( boolean answer ){ if (answer){ switch (randQuest.nextInt(1)){ case 0: return("Very Good!"); } switch (randQuest.nextInt(1) ){case 0: return( "No. Please try again." ); } return "Some value"; }else return "Some value"; }


