java.lang.Class.isEnum()


java.lang.Class.isEnum()

package com.codingdict;



import java.lang.*;



// enum showing programming languages

enum Language {

   C, Java;

}



public class ClassDemo {



   public static void main(String args[]) {



      // returns the name and hashCode of this enum constant

      System.out.print("Programming in " + Language.C.toString());      

      System.out.println(", Hashcode = " + Language.C.hashCode()); 

      System.out.print("Programming in " + Language.Java.toString());  

      System.out.println(", Hashcode = " + Language.Java.hashCode());  



      System.out.println(Language.class.isEnum());

   }

}