title: my program runs up until the if statements and won't enter into any of them. Can anyone please explain why this might be happening?
body: <p>This is my code:<br>
  It enters in the while loop ok but then won't go into any of the If statements.</p>
  
  <pre><code>public static void main(String [] args)
  {   Scanner scan = new Scanner(System.in);
         System.out.print("Would you like to add a new component or find a 
         component? (A=add)(F=find): ");
         String action = scan.nextLine(); action=action.toUpperCase();
  
         while (select==true) {              
             if (action=="A") {
                  System.out.print("Do you want to add a Resistor or Inductor? 
                  (R=resistor)(I=Inductor): ");               
  </code></pre>