Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

functional programming in the java language

Name: Anonymous 2007-06-08 11:04 ID:zBdqBvbC

http://www.ibm.com/developerworks/library/j-fp.html

now, this is where the fun bit shows up:


Listing 1. A closure in disguise


Runnable worker = new Runnable()
{
  public void run()
  {
    parseData();
  }
 };


The method parseData is literally enclosed (hence the name "closure")

Name: Anonymous 2007-06-08 11:06 ID:d+cDNIwZ

..and you said java dont has closures

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List