functions passed as arguments

greenspun.com : LUSENET : Java Programming : One Thread

Is it possible to pass functions as arguments in Java? If so, which is the syntax?

-- annye pearl (anypearl@yahoo.com), August 31, 2000

Answers

No, In java the smallest unit is an object. So, create an object with your method(function) and pass the object to the method.

-- Prantor Bora (prantor.bora@lawson.com), September 18, 2000.

Actually, using Reflection it is possible.

-- snow (snowlick@yahoo.com), February 10, 2003.

Moderation questions? read the FAQ