5. Variables and Data Types

JavaFX applications manipulate data held either in script variables or as instance variables of JavaFX classes.1 Every item of data has a specific type, such as String or Number, which determines the values that it accepts and the operations that may be performed on it. Like Java, JavaFX has a small set of basic data types that are intrinsic to the language. It also has a runtime library of class types that are not part of the language itself, and which you can use to build user interfaces, retrieve information from a web server, and so on. In this chapter, you learn about the basic data types, how to declare and initialize script variables, and how to make use of both JavaFX and Java classes in your application. ...

Get JavaFX™ Developer’s Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.