Iam new to Java GUI; the usage of "<>" is new to me. Can someone explain from the code below as used in the EventHandler? Also, is there a way to avoid using it?
btn.setOnAction(new EventHandler<ActionEvent>() {
public void handle(ActionEvent event) {
System.out.println("Hello World");
}