Want to solve programming problems and get paid for it? If that sounds interesting to you then contact us.
Problem :
Everytime we compile the GUI , we get bellow error
exception in thread "javafx application thread" java.lang.nullpointerexception
My advise would be to never initialize variable at the declaration, but do it in constructor, and then check for every nullity possible.
Please refer bellow code:
public class MyClass{ double mycrashRisk; public MyClass(){ TDriver id = ...//get id if(id == null){ throw new MyExplicitException(); } mycrashRisk = mycalcRisk(id); }
https://github.com/jfoenixadmin/JFoenix/issues/970