fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12.  
  13. Random random = new Random();
  14. random.setSeed(System.currentTimeMillis());
  15.  
  16. List<String> Menu = new ArrayList<>();
  17.  
  18. Menu.add("혼돈");
  19. Menu.add("춘하추동 칼국수");
  20. Menu.add("왕푸징");
  21. Menu.add("고메밀면");
  22. Menu.add("우마이도");
  23. Menu.add("NC지하");
  24. Menu.add("수라국밥");
  25. for (int i=0; i<2; i++) {
  26. System.out.println("오늘의 혼밥메뉴는 : " + Menu.toArray()[random.nextInt(Menu.size())]);
  27. }
  28.  
  29. }
  30.  
  31. }
Success #stdin #stdout 0.14s 55344KB
stdin
Standard input is empty
stdout
오늘의 혼밥메뉴는 : 수라국밥
오늘의 혼밥메뉴는 : 우마이도