title: how should i put my method(with array) in a switch statement in java?
body: <p>whats the right way to put a method(with array code) in a switch statement?</p>
  <pre><code>    public static void  prtEmployees(String empNo[], String Name[], int rate[]) {
      System.out.println(&quot;Employee No.    Employee Name   Rate/Hour&quot;);
      for(int i = 0; i &lt; empNo.length; i++) {
          System.out.printf(&quot;%s: %s&quot;, empNo[i], Name[i], rate[i]);
      }
  
  }
  private void Action(int choice) {
  switch(choice) {
  case 1:
      prtEmployees(); // im having an error here
      break;
  </code></pre>