vendredi 3 juin 2016

Java - Else if statement error [duplicate]

This question already has an answer here:

public class applicatiion {
    public static void main(String[] args) {
        int myInt = 5;

        if(myInt < 5); {
            System.out.println("Less than 5");
        }

        else if(myInt > 5); {
            System.out.println("Greater than 5");
        }
        else {
            System.out.println("None of the above");
        }
        }

    }   

Not sure whats wrong. Quite new to java and just testing. I havent been able to find whats wrong when I checked on different forums.

Aucun commentaire:

Enregistrer un commentaire