Created
January 14, 2020 21:47
-
-
Save eldermoraes/0c3fa0ce9374fd4a831ba4eef47e36dd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package coffee.module; | |
import java.util.Random; | |
public class Coffee { | |
public enum CoffeeType { | |
AMERICANO, LATTE, CAPUCCINO, ESPRESSO, FLAT_WHITE, LONG_BLACK, MACHIATO, MOCHACCINO, IRISH, VIENNA, AFFOGATO | |
} | |
public static String name() { | |
return CoffeeType.values()[new Random().nextInt(CoffeeType.values().length)].name(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment