日期:2014-05-20 浏览次数:20976 次
if(start){//如果没有start是true的话进入 条件循环 这里判断的是否点击是符号键
if(command.equals("-")){//判断你是否点的是‘-’号
System.out.println("进入了减号");
display.setText(command);
start = false;
}else//如果不是'-'号
lastCommand = command;//把该符号赋值 给lastCommand
}else{//如果不是点击是符号键 的话进入
calculate(Double.parseDouble(display.getText()));
lastCommand = command;
start = true;
}