What;s wrong with my code? SOS assignment help

I’m supposed to develop an algorithm to determine what mortgage rate is
available based on the type and duration of the mortgage desired. This is what I currently have:

import javax.swing.JOptionPane;
String inputX;
inputX=JOptionPane.showInputDialog("Please enter the type of mortgage you would like (e.g. open or closed): ");
String inputY;
inputY=JOptionPane.showInputDialog("Please enter the term duration of your mortage (e.g. 1 yr): ");
if (inputX == "open")
{
  if (inputY == "1 yr")
  {
   println("7.10%");
  }
else if (inputY == "3 yr")
   {
   println("7.50%");
   }
else if (inputY == "5 yr")
   {
   println("Not Available");
   }
else 
{
  println("invalid term duration");
}
}
if (inputX == "closed")
{
  if (inputY == "1 yr")
   {
    println("5.30%");
   }
else if (inputY == "3 yr")
{
   println("5.00%");
}
else if (inputY == "5 yr")
{
   println("5.75%");
}
else {
  println("invalid term duration");
}
}
else {
  println("invalid mortgage type");
}

println("Have a nice day!");

The problem I’m having is that when I run the program and enter in the type of mortgage and duration, no matter what I put in it always prints “invalid mortgage type”. For example, if I were to input “closed” and “1 yr”, two terms which are supposed to print “5.30%”, it doesn’t work. I’m not sure what I’ve done wrong here. Any help would be appreciated!

yes i see same problem
-a- a else was missing
-b- the ( inputX == “open” ) seems not to work
but with
a.contentEquals(b)
it worked
-c- possibly use a selection list

import javax.swing.JOptionPane;
final String[] select1 = { "open", "closed"};
final String[] select2 = { "1 yr", "3 yr", "5 yr"};

String inputX;
inputX= (String) JOptionPane.showInputDialog(frame, "type of mortgage you would like: ", "select string", JOptionPane.QUESTION_MESSAGE, null, select1, select1[0]);
String inputY;
inputY= (String) JOptionPane.showInputDialog(frame, "term duration of your mortage: ", "select string", JOptionPane.QUESTION_MESSAGE, null, select2, select2[0]);

if (true) {
  print("inputX_");
  print(inputX);
  print("_inputY_");
  print(inputY);
  println("_");
}

if (inputX.contentEquals("open"))
{ 
  if (inputY == "1 yr")
  {
    println("7.10%");
  } else if (inputY == "3 yr")
  {
    println("7.50%");
  } else if (inputY == "5 yr")
  {
    println("Not Available");
  } else
  {
    println("invalid term duration");
  }
} else if (inputX.contentEquals("closed"))
{ 
  if (inputY == "1 yr")
  {
    println("5.30%");
  } else if (inputY == "3 yr")
  {
    println("5.00%");
  } else if (inputY == "5 yr")
  {
    println("5.75%");
  } else {
    println("invalid term duration");
  }
} else {
  println("invalid mortgage type");
}

println("Have a nice day!");