JavaFx choicebox event handler method doesnt change variable?
<p>I'm new at javafx but I'm writing an app and I want my "to" value to change depending on which option is chosen in the choicebox but my current code always keeps it at 0..help? I want to be able to change the to depending on state</p>

<pre><code>      public void start(Stage primaryStage) {
     double to=0;
       primaryStage.setTitle("ShCal");
     GridPane pane = new GridPane();
   ` pane.setAlignment(Pos.CENTER);
     pane.setHgap(10);
     pane.setVgap(10);
     pane.setPadding(new Insets(25, 25, 25, 25));
     Scene scene = new Scene(pane, 300, 275);

     //button
     Button button=new Button("to");
     pane.add(button, 0, 3);

     //Pick state
     Label State=new Label("State");
     pane.add(State,0,0);
     //choicebox
     ChoiceBox&lt;String&gt; choicesBox=new ChoiceBox&lt;&gt;();
     choicesBox.getItems().addAll("NJ","NY");
     pane.add(choicesBox,1,0);
     //set default
     choicesBox.setValue(null);

     button.setOnAction(e-&gt;getChoice(choicesBox,to));




    primaryStage.setScene(scene);
    primaryStage.show();

    }

    private double getChoice(ChoiceBox&lt;String&gt; choicesBox, double tx) {
          String state=choicesBox.getValue();
          System.out.print(tx);
          if(state=="NJ")
          {
             tx=10/100;
         }
           System.out.print(state);
         return tx;
         }


   public static void main(String[] args) {
        launch(args);
     }
    }
</code></pre>