Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public interface ReturnValues
- {
- public int EXIT_SUCCESS = 0;
- public int EXIT_FAILURE = 1;
- }
- public enum ReturnValue {
- SUCCESS(0),
- FAILURE(-1);
- private int returnCode;
- private ReturnValue(int returnCode) {
- this.returnCode = returnCode;
- }
- public int getReturnCode() {
- return returnCode;
- }
- }
- System.exit(ReturnCode.FAILURE.getReturnCode());
Add Comment
Please, Sign In to add comment