昨天我开始使用Java,我想用我学到的知识来制作一个简单的计算器。问题是我遇到了这个错误,并且从网上搜索到的内容,我必须将变量等同于某种变量才能使其正常工作,但事实并非如此。有人可以帮我吗?
import java.util.Scanner;
class Prueba {
public static void main (String args[]) {
Scanner calculator = new Scanner(System.in);
double numberone, numbertwo, operation;
System.out.println ("Type of operation");
operation= calculator.nextDouble();
if (1== numberone + numbertwo);
if (2== numberone - numbertwo);
System.out.println ("First number");
numberone = calculator.nextDouble();
System.out.println ("Second number");
numbertwo = calculator.nextDouble();
System.out.println (operation);
}
}