Guest User

Untitled

a guest
Jun 1st, 2022
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.53 KB | None | 0 0
  1. public class Enm1 {
  2.     enum Season {
  3.         SUMMER("S U M M E Rī¸ī¸ 🌞"), AUTUMN("A U T M N 🍂"), WINTER("W I N T E R â„ī¸"), SPRING(
  4.                 "S P R I N G 🌱");
  5.  
  6.         private String value;
  7.  
  8.         private Season(String value) {
  9.             this.value = value;
  10.         }
  11.  
  12.         public String toString() {
  13.             return this.value;
  14.         }
  15.     }
  16.  
  17.     public static void main(String[] args) {
  18.         for (Season s : Season.values()) {
  19.             System.out.println(s);
  20.         }
  21.     }
  22. }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment