Concatenation is the most common string operation. It's called by one property of the String type and takes another property of any type or a constant that will be used as a String, as shown in the following code snippet:
// chapter3/operations/ConcatBinding.java label.textProperty().bind( stage.widthProperty().asString() // property one .concat(" : ") // concatting with a string constant .concat(stage.heightProperty()) // concatting with a property 2);
Note two very important concepts here:
- Binding operations allow us to chain them one after another (as in the Builder pattern, or in the Java8 Streams API)
- We've bound one property to the ...