I am working on one pathology project,I have Two classes,One Is TransactionViewController and Another is UrineExaminationController. Inside both classes there are two methods one is viewUsingLabID and another is Initialize. Now I want to access String LABID from method viewUsingLabID into Initialize method which is in another class.I am stuck here,please help me to get out of this.
Below is my code ,
Method from TransactionViewController
String LABID;
@FXML
   public String viewUsingLabID(ActionEvent actionEvent) throws Exception{
       LABID = lab_id.getText();
       lab_id.setText(LABID);
       UrineExaminationController urineExaminationController = new UrineExaminationController();
       urineExaminationController.sendData(LABID);
}
method from UrineExaminationController,
@Override
   public void initialize(URL url, ResourceBundle rb) {
       sendData(id);
       System.out.println("urine id = "+id);
     }
void sendData(String LABID){
       System.out.println("ididid isisis = "+LABID);
   }
