Java Reference
In-Depth Information
:String —this type represents a collection of characters contained within within quotes
(double or single, see following). Unlike Java, the default value for String is empty ("").
"The quick brown fox jumps over the lazy dog" or
'The quick brown fox jumps over the lazy dog'
:Number —this is a numeric type that represents all numbers with decimal points. It is backed
by the 64-bit double precision floating point Java type. The default value of Number is 0.0 .
0.01234
100.0
1.24e12
:Integer —this is a numeric type that represents all integral numbers. It is backed by the
32-bit integer Java type. The default value of an Integer is 0 .
-44
7
0
0xFF
:Boolean —as the name implies, this type represents the binary value of either true
or false .
:Duration —this type represent a unit of time. You will encounter its use heavily in animation
and other instances where temporal values are needed. The supported units include ms , s , m ,
and h for millisecond, second, minute, and hour respectively.
12ms
4s
12h
0.5m
:Void —this type indicates that an expression or a function returns no value. Literal
representation of Void is null .
Variable scope
Variables can have three distinct scopes, which implicitly indicates the access level of the
variable when it is being used.
Script level
Script variables are defined at any point within the JavaFX script file outside of any code block
(including class definition). When a script-level variable is declared, by default it is globally
visible within the script and is not accessible from outside the script (without additional
access modifiers).
 
Search WWH ::




Custom Search