Guest User

Untitled

a guest
Jan 22nd, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. public class SpeakingEnum {
  2. public static enum SPEAKING_ENUM {
  3. SOME_VALUE,
  4. SOME_OTHER_VALUE;
  5.  
  6. public void speak() {
  7. System.out.println("this=" + this);
  8. }
  9. }
  10.  
  11. public static void main(String [] args) {
  12. SPEAKING_ENUM se1 = SPEAKING_ENUM.SOME_VALUE;
  13. SPEAKING_ENUM se2 = SPEAKING_ENUM.SOME_OTHER_VALUE;
  14. se1.speak();
  15. se2.speak();
  16. }
  17. }
Add Comment
Please, Sign In to add comment