Code:
import java.util.Scanner;
public class Calculator {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in) ;
System.out.println("Enter your two numbers and the operation with spaces between e.g 8 9 -");
String calculation=scan.nextLine();
String [] parts = calculation.split("