Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Trending News
Java If statement?
public class Calculater {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int firstNumber;
int secondNumber;
int thirdNumber;
int result;
System.out.println(" 1 - Addition ");
System.out.println(" 2 - Subtraction ");
System.out.println(" 3 - Division ");
System.out.println(" 4 - Multiplication ");
thirdNumber = scanner.nextInt();
if (thirdNumber = 1;;
......
Near the thirdNumber it says expression expected. Can anyone explain to me whats wrong?
Be the first to answer this question.