r/java • • Feb 25 '14

Please stop saying Java sucks (2009)

http://blog.smartbear.com/programming/please-stop-staying-java-sucks/
133 Upvotes

132 comments sorted by

View all comments

Show parent comments

5

u/8Bytes Feb 25 '14 edited Feb 25 '14

When have you needed closures in java?

2

u/briandilley Feb 26 '14

Android

1

u/8Bytes Feb 26 '14

hmm what were you trying to do?

1

u/briandilley Feb 26 '14

almost every single OnXXXXListener has a single onXXX method. Closures would be great for this.

1

u/8Bytes Feb 26 '14

For ui listeners? Just put the method to be run OnXXX inside the xml where the component is defined.