Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package a.b.c.d
- public class myClass {
- public enum State {
- START, FAIL, SUCCESS
- }
- myClass() { // constructor
- }
- }
- // somewhere else
- package q.w.e.r
- import a.b.c.d.myClass;
- public class otherClass {
- aMethod(myClass.State state) {
- switch(state) {
- case myClass.State.START:
- //do things
- break;
- }
- }
- public static main() {
- myClass.State a = myClass.State.FAIL;
- aMethod(a);
- }
- }
Add Comment
Please, Sign In to add comment