I have used closures concept in javascript many times. I am new to GWT and I read somewhere it is not possible to use Closures in GWT. Is my understanding wrong or will I able to use it?
Can someone provide me an example of closure use in GWT.
I have used closures concept in javascript many times. I am new to GWT
Share
The equivalent of closures in Java are local classes, which can be anonymous (just like anonymous functions in JS).
Java 8 will bring us lambdas, but GWT isn’t yet supporting Java 7, so lambdas in GWT are not for tomorrow 😉
See http://en.wikipedia.org/wiki/Closure_(computer_science)#Local_classes_.28Java.29