K
K
krembrule20162018-10-16 15:45:05
Java
krembrule2016, 2018-10-16 15:45:05

How to interpret the syntactic construction?

Good afternoon!
I am reading the book "Java 8. Beginner's Guide"
Perhaps because I read selectively, or maybe not, but I can not understand the following syntactic construction

ЬtnUp.setOnAction(new EventHandler<ActionEvent>()

puЬlic void handle(ActionEvent ае) {

response.setText("You pressed Up.");

}
}) ;

And specifically, what is this "<"ActionEvent">" in such brackets.
Google about anonymous classes, but there is no such thing.
Only comes across
public class Anonymous {
   public static void main(String[] args) {
    Runnable anonym = new Runnable() {
      public void run() {
      }
    };
  }
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Spirin, 2018-10-16
@krembrule2016

Generics

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question