helpermethod
helpermethod

Reputation: 62205

Several small questions considering the JavaFX Script programming language

Which are the min/max values I can pass to an Integer/Number? Does Integer use java.lang.Integer internally? And what if the variable overflows? Does it automatically expand java.lang.Long?

In an article I read the def keyword is the equivalent of marking a variable as final in Java but to me, it looks like it's more like const in C.

Does JavaFX have checked exceptions?

Sadly, this is what the [Language Reference][1] says:

[To do: write chapter]

Upvotes: 0

Views: 112

Answers (1)

Josh Marinacci
Josh Marinacci

Reputation: 1745

The min/max values of Integer, Float, Long, etc. in JavaFX Script are the same as Java. You can use Integer.MAX_VALUE. JavaFX will compile down to the Java equivalents internally.

Def is meant to be used for constants or immutable singletons.

JavaFX Script does not have checked exceptions, but you can still catch them with a try/catch block.

Upvotes: 2

Related Questions