Created
July 28, 2018 16:05
-
-
Save theresajayne/173a0565f61d2ed33ac929d28c9127b6 to your computer and use it in GitHub Desktop.
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 enum Count { | |
ONE(1), | |
TWO(2), | |
THREE(3), | |
FOUR(4), | |
FIVE(5); | |
private int num; | |
Count(int num) | |
{ | |
this.num = num; | |
} | |
public int getNum() | |
{ | |
return num; | |
} | |
public Count getNext() | |
{ | |
for(Count cnt :Count.values()) | |
{ | |
if(cnt.getNum()==num+1) | |
{ | |
return cnt; | |
} | |
} | |
return null; | |
} | |
} |
WhatsApp number send me please
03446178076
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi