Spec-Zone .ru
спецификации, руководства, описания, API

Default Values

Each JavaFX type has an associated default value. The default variable is the value of a variable before it is set. It is also the value of an expression of that type if an error is encountered. For types with optional cardinality their default value is null. For example:

var x : Foo; 
println(x);

Will print null since x has not been set.

For types with sequence cardinality their default value is the empty sequence of their element specifier. For example:

var seq : Integer[]; 
println(sizeof seq);

Will print zero as the size of seq since seq has not been set and its initial value will be an empty sequence of Integer.

Each required type has its own default value, as shown in the Type Chart.

var k : Integer; 
println(k);

Will print zero since k has not been set and the default value for Integer is 0.