title: How to pass enum as an argument in a method in java?
body: <pre><code>public class Enumvalues{
  
      enum courseList {
          JAVA,
          C,
          PYTHON,
          PERL
      }
  
      enum generalInformation {
          NAME,
          AGE,
          PHONE
      }  
  
      enum sex {
          MALE,
          FEMALE
      }
  }
  
  public static void main(String args[]) {
       printEnumValue(generalInformation); // how to pass enum in this block
  }
  
  
  static void printEnumValue(enum generalInformation) { // how to receive enum  in this block    
      System.out.println(java.util.Arrays.asList(generalInformation.values()));
  }
  </code></pre>