Are there other ways I can check if these are numbers or not in the depositCommand?
package com.codegym.task.task26.task2613;
public enum Operation {
INFO,
DEPOSIT,
WITHDRAW,
EXIT;
public static Operation getAllowableOperationByOrdinal(Integer i){
if (i == null) throw new IllegalArgumentException();
switch(i){
case 1:
return INFO;
case 2:
return DEPOSIT;
case 3:
return WITHDRAW;
case 4:
return EXIT;
default:
throw new IllegalArgumentException();
}
}
}