Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class SpeakingEnum {
- public static enum SPEAKING_ENUM {
- SOME_VALUE,
- SOME_OTHER_VALUE;
- public void speak() {
- System.out.println("this=" + this);
- }
- }
- public static void main(String [] args) {
- SPEAKING_ENUM se1 = SPEAKING_ENUM.SOME_VALUE;
- SPEAKING_ENUM se2 = SPEAKING_ENUM.SOME_OTHER_VALUE;
- se1.speak();
- se2.speak();
- }
- }
Add Comment
Please, Sign In to add comment