samedi 6 juin 2020

I want the if statement to work when it is or over 12 minutes, but i keep getting an error saying "Type mismatch: cannot convert from int to boolean"

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