I have this code and my if statement always returns false even though I entered the right inputs.
    boolean z = false;
    String x, y;
    Scanner cin = new Scanner(System.in);
    System.out.println("enter x");
    x = cin.nextLine();
    System.out.println("enter y");
    y = cin.nextLine();
    if(x == "x" || y == "y") {
        z = true;
    }
    System.out.println(z);
    if (z) {
        System.out.println("successful");
    }
 
    