title: How to get a system.out.println to return in a method
body: <p>I have a program which plays a game of superhero top trumps and I need to repeat the menu every time a user plays the game. I've tried to create a method (displayMenus) which would be inserted into every switch statement (except for closing the program), however I don't understand how to get it to return this menu. </p>
  
  <pre><code>public class Heros {
  
  public static void main(String[] args) {
  
  
  
  Scanner input = new Scanner(System.in);
  
  int index = 0;
  
  
      do {
  
       int inp = input.nextInt();
  
      switch (inp) {
          //FIRST
          case 1:
              index = 0;
              System.out.println(HerosAsList.getHeros().get(index));
              System.out.println(displayMenus);
              break;
          //NEXT
          case 2:
              index++;
              if (index &gt; HerosAsList.getHeros().size() - 1) {
                  index = HerosAsList.getHeros().size() - 1;
              }
              System.out.println(HerosAsList.getHeros().get(index));
              System.out.println(displayMenus);
              break;
          //PREV
          case 3:
              index--;
              if (index &lt; 0) {
                  index = 0;
              }
              System.out.println(HerosAsList.getHeros().get(index));
              System.out.println(displayMenus);
              break;
          //LAST
          case 4:
              index = HerosAsList.getHeros().size() - 1;
              System.out.println(HerosAsList.getHeros().get(index));
              System.out.println(displayMenus);
              break;
          //QUIT
          case 0:
              System.out.println("Closing system");
              System.exit(inp);
  
              break;
      }
  }
  
  while(index&lt;HerosAsList.getHeros ().size());
  
  }  
  public static displayMenus () {
  
  
      System.out.println("First - 1");
      System.out.println("Next -  2");
      System.out.println("Prev -  3");
      System.out.println("Last -  4");
      System.out.println("Quit -  5");
      System.out.println("");
      System.out.println("Enter Choice:");
  
  
  
  }
  }
  </code></pre>
  
  <p>any help is greatly appreciated, I just can't seem to get my head around methods!</p>