Skip to content

Instantly share code, notes, and snippets.

@eldermoraes
Created January 14, 2020 21:47
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
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