/* How to save object in a variable and send it to another function*/
@Override
public void onClick(View v) {
int tappedapples=0;
int colletedappels=0;
// int mycollectedapples = 0;
v.setVisibility(View.GONE);
colletedappels = tappedapples;
colletedappels++;
txt.setText("" + colletedappels);
Checkobjct(colletedappels);
}
如何在变量中保存对象并将其发送到另一个函数
答案 0 :(得分:0)
boolean compare(YourClass object1, YourClass object2)
{
return object1.equals(object2);
}