title: Java Switch Statement for operators
body: <p>Help guys I am trying to create a program that lets you choose +,-,/,* and how can I make it work using switch statement </p>
  
  <pre><code>import java.util.Scanner;
  
  public class practice1{
      public static void main (String[]Args){
          Scanner input = new Scanner(System.in);
          Integer num1, num2;
          char op = '+', '-', '/', '*';
  
          System.out.println("Select an operator +,-,*,/");
          switch(op){
              case "+":
              System.out.println("Enter two numbers to add");
              System.out.print("Enter first number: "); num1 = input.nextInt();
              System.out.print("Enter second number: "); num2 = input.nextInt();
              System.out.println(num1 + num2);
              break;
  
  
          }
  
      }
  }
  </code></pre>