How to Make Calculator Using Java In 4 minutes !!! Simple Calculator in Java

import java.util.Scanner;

class Main {
  public static void main(String[] args) {

    char operator;
    Double number1, number2, result;

    Scanner input = new Scanner(System.in);

    System.out.println("Choose an operator: +, -, *, /");
    operator = input.next().charAt(0);

    System.out.println("Enter the first number");
    number1 = input.nextDouble();

    System.out.println("Enter the second number");
    number2 = input.nextDouble();

    switch (operator) {

 ...
Continue Reading →