title: Can I use a char to do calculation in Java
body: <p>Is it possible for me to do something like the following below in order to save time from doing if else statement?</p>
  
  <pre><code>int x = 1;
  int y = 2;
  char z = '+';
  
  System.out.println(x + z + y); //e.g. 1 + 2 i.e. 3
  </code></pre>
  
  <p>Please advise.</p>