GMgKe586q6suSQnyqZLlGCooeWM

Pages

Search

Wednesday, December 22, 2010

Function In JavaFX

Function concept in JavaFX is so simple like in Javascript:

function hello(name:String){
    println("Hello, {name}!");
}

To call it, use:
hello("Lady Gaga");

Other samples:
function add(x:Integer,y:Integer){
    println("Add: {x} + {y} = {x+y}");
}

function add(x:Integer,y:Integer){
    return x+y;
}
         
Share/Bookmark

No comments:

Post a Comment