Hello, I would like to ask a question, I just started programming, trying to do something like a calculator, while stuck on the if statement, I want using input ie. Scanner, enter a certain sign and set it in the variable "znak" to determine what to do, multiply, add
public static void main(String[] args) { Scanner scan = new Scanner(System.in); String znak; int a,b,result; System.out.println("Привет, это калькулятор чисел.\nВведите что вы хотите сделать."); System.out.println("Сложение +"); znak = scan.nextLine(); if (znak == "+") { System.out.println("Вы выбрали сложение\n Введите первое число"); } }