Created
          March 18, 2020 13:35 
        
      - 
      
 - 
        
Save martijndwars/d654283355e339b4af5cf8663ea5b878 to your computer and use it in GitHub Desktop.  
    isEnum?
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | public class Main { | |
| public enum Days { | |
| SUNDAY, MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, | |
| SATURDAY { | |
| public String toString() { | |
| return "Samstag"; | |
| } | |
| }; | |
| } | |
| public static void main(String[] args) { | |
| System.out.println(Days.class.isEnum()); // true | |
| System.out.println(Days.SUNDAY.getClass().isEnum()); // true | |
| System.out.println(Days.SATURDAY.getClass().isEnum()); // false | |
| } | |
| } | 
      
      
  Author
  
  
      
          
      
      
            martijndwars
  
      
      
      commented 
        Mar 18, 2020 
      
    
  
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment