我有 2 个对象
obj.targetWeight = targetWeight.getText().toString();
obj.currentWeight = currentWeight.getText().toString();
我想从另一个中减去一个。
我试过这个没有运气。
if (obj != null){
outputEditText.setText("Your target weight is " + obj.targetWeight +
"\n Your current weight is " + obj.currentWeight + "\n"
+ (obj.currentWeight - obj.targetWeight));
}
我很确定这不是应该做的,但是我不知道该怎么做。