0

Possible Duplicate:
What's the nearest substitute for a function pointer in Java?

How would you run a method that was passed through parameters?

Example:

public static void runThing(Void method) {
method();
}
Community
  • 1
  • 1
Gray Adams
  • 3,927
  • 8
  • 32
  • 39

2 Answers2

0

Using reflection APIs in Java.

Gaurav
  • 1,549
  • 2
  • 15
  • 31
0

As of Java 1.7, closures are not supported in the language.

Hamed
  • 1,382
  • 11
  • 20