Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public enum NomeEnumerazione
- {
- UNO(1), DUE(2), TRE(3);
- private int valore;
- NomeEnumerazione(int valore)
- {
- this.valore = valore;
- }
- public int getValore()
- {
- return valore;
- }
- public void setValore(int valore)
- {
- this.valore = valore;
- }
- @Override
- public String toString()
- {
- return ""+valore;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement