Guest User

Untitled

a guest
Jul 21st, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. public interface ReturnValues
  2. {
  3. public int EXIT_SUCCESS = 0;
  4. public int EXIT_FAILURE = 1;
  5. }
  6.  
  7. public enum ReturnValue {
  8. SUCCESS(0),
  9. FAILURE(-1);
  10.  
  11. private int returnCode;
  12.  
  13. private ReturnValue(int returnCode) {
  14. this.returnCode = returnCode;
  15. }
  16.  
  17. public int getReturnCode() {
  18. return returnCode;
  19. }
  20. }
  21.  
  22. System.exit(ReturnCode.FAILURE.getReturnCode());
Add Comment
Please, Sign In to add comment