Advertisement
Kredens234

lambda example

May 4th, 2018
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.31 KB | None | 0 0
  1.   btn.setOnAction(new EventHandler<ActionEvent>() {
  2.  
  3.             @Override
  4.             public void handle(ActionEvent event) {
  5.                 System.out.println("Hello World!");
  6.             }
  7.         });
  8.  
  9.   btn.setOnAction((ActionEvent event) -> {
  10.             System.out.println("Hello World!");
  11.         });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement