An Oracle blog about Consulting Security Corner

  • March 1, 2010

An unsung gem in JavaFX

Guest Author

I decided to do some more exploring with JavaFX (again). I have no real idea what I'll do with it but I have often found it useful that playing with new technologies is a good way to inspire yourself. And you never know when you might need the knowledge gained.

There's actually quite a few nifty things in JavaFX - such as binding of variables and the ability to draw a UI in PhotoShop or Inkscape and use those images natively from code.

But one thing I (re)discovered today was that when you print variables like

println("my name is {name}");

It prints out the value of the variable "name".

What is the gem in this?

I find this much more easier to read than the Java (and almost every other language construct):

println("my name is "+name);

In particular in long sentences.

Though the syntax I really miss from Perl is the ability to use the qw function. With qw you could decide to use another marker to denote begin and end strings. This was useful in web-apps where you often have to mix in quotation marks for Javascript and HTML.

Posted via email from Virtual Identity Dialogue

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.