title: Simple Command Line calculator
body: <p>I have written a code for a command-line calculator in Java but I can't understand the errors which are not allowing it to compile </p>
  
  <pre><code>public class Calculator{
  public static void main(String[] args){
  
  int numOne = args[0];
  int numTwo = args[1];
  
  add(numOne, numTwo) {
      result = numOne + numTwo;
      System.out.println("{numOne} + {numTwo} = {result}");
  }
  
  subtract(numOne, numTwo) {
      result = numOne - numTwo;
      System.out.println("{numOne} - {numTwo} = {result}");
  }
  
  multiply(numOne, numTwo) {
      result = numOne * numTwo;
      System.out.println("{numOne} * {numTwo} = {result}");
  }
  
  divide(numOne, numTwo) {
      result = numOne / numTwo;
      System.out.println("{numOne} / {numTwo} = {result}");
  }
  }
  }
  </code></pre>