There are two type of variables in JavaFX. The first is def. def means that the variable won't change through all of the program running, or in other words it means that def is for declaring a constant:
def name = "lady gaga";
def code = 45;
def sleep = false;
While var is for declaring a variable that may be change over program running.
No comments:
Post a Comment