2020年12月24日星期四

Dynamic global variables in java

I am pretty new to java and while working on an FXML project I want an instance of class to be shared by multiple classes. That instance cannot be Static because i have to load that instance from a file and then call it in multiple classes. Static just gets unloaded when the scope changes. Any help on what should be done? Or is there a way arround other than static?

https://stackoverflow.com/questions/65444529/dynamic-global-variables-in-java December 25, 2020 at 09:34AM

没有评论:

发表评论