I want the if statement to run when it is or passed 12 minutes, but I keep getting the error "Type mismatch: cannot convert from int to boolean", how can I get through this?
Thread cloo = new Thread() {
public void run() {
try {
while (true) {
Calendar cal = new GregorianCalendar();
int day = cal.get(Calendar.DAY_OF_MONTH);
int hour = cal.get(Calendar.HOUR);
int min = cal.get(Calendar.MINUTE);
int second = cal.get(Calendar.SECOND);
lblNewLabel_1.setText(day + "/ " + hour + ":" + min + ":" + second);
sleep(1000);
if (min =+ 12) { // <<<<< where the problem is
message.setText("its been over 12 minutes");
}
}
Aucun commentaire:
Enregistrer un commentaire