Skip to content

Instantly share code, notes, and snippets.

@eldermoraes
Created January 14, 2020 21:47
Show Gist options
  • Save eldermoraes/0c3fa0ce9374fd4a831ba4eef47e36dd to your computer and use it in GitHub Desktop.
Save eldermoraes/0c3fa0ce9374fd4a831ba4eef47e36dd to your computer and use it in GitHub Desktop.
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