SHARE
TWEET

Untitled

a guest Jun 20th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class EnumCalculator {
  2.  
  3.     //Notice how concise the code has become in the logic
  4.  
  5.     public int calculate(char op, int a, int b) {
  6.         return OperationEnum.of(op).operate(a,b);
  7.     }
  8. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top