mardi 6 octobre 2015

Java - Enumerated types in IF statements

So with my basic code I was curious if it is possible to have an if statement like below:

if (ScannerInput.equalsIgnoreCase(AllEnums)
    System.out.pringln("Sample");

If you understand I wish to have just the name of an Enum for example for it to be true to all values. If this is possible, how do I go about it?

Aucun commentaire:

Enregistrer un commentaire