More specifically, I'm talking about for Java Swing where you would use a lambda expression for adding an ActionListener.
combobox.addActionListener(
event -> {if (boolean) runMethod()});
I've tried compiling as written, but it didn't work so I'm wondering if such a flow of logic is just not allowed or if I just need to reword a few things.
combobox.addActionListener(
event -> {if (boolean) runMethod();});
Missing a semicolon.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.