<< The JavaFX Coding Challenge: Win $25,000!!! | Home | Apple Releases Java 6 for 32-bit Intel and the iPhone >>

Saturday JavaFX Script Quiz: Is It Possible ...?

Given the following JavaFX Script class and variable declaration:

public class Foo {
    public var i:Integer = 1024 on replace {
        if (i < 1000) {
            i = 1000;
        } else if (i > 2000) {
            i = 2000;
        }
    }
}
var foo: Foo;

is it possible for this line of code later in the program:

println(foo.i)

to print anything other than an integer between 1000 and 2000 onto the console?

Tags :


Re: Saturday JavaFX Script Quiz: Is It Possible ...?

I don't know the answer but I'm happy to see the return of a quiz!

Add a comment Send a TrackBack