Milan Milan - 1 year ago 98
Java Question

Lambda Expression Java Conversion

Im quite new to the new Java features and was wondering how I could convert this bit of code into a lambda expression?

tc.setCellValueFactory((p) -> {
return new ReadOnlyStringWrapper(p.getValue());

This is what IntelliJ Idea IDE is giving me.

Thsi is

Answer Source

What your IDE means is likely:

(p) -> new ReadOnlyStringWrapper(p.getValue());

No return needed.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download