In the below JAVA code Mul and Add operators are not working only X-y operator result i am getting please advice how to find the answer for this problem.
public class oppswithvalue {
void calculate(int x,int y,String op)
{
//System.out.println(op);
if(op=="*")
System.out.println("X x Y : "+(x*y));
else if(op=="+")
System.out.println("X + Y : "+(x*y));
else
System.out.println("X - Y : "+(x-y));
}
public static void main(String args[]) throws IOException
{
BufferedReader ar=new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter first number : ");
int no1=Integer.parseInt(ar.readLine());
System.out.println("Enter Second number : ");
int no2=Integer.parseInt(ar.readLine());
System.out.println("Enter an operator : ");
String op=ar.readLine();
oppswithvalue tt= new oppswithvalue();
tt.calculate(no1, no2,op);
}
}