Name: javaboi 2009-04-23 11:43
Hi dudes, I'm wondering about how I can do something like this in java
func(){print "hi"}
func2(){print " there"}
tab[] funcs = {"func", "func2"}
for(int i = 0; i < 2; i++){
funcs[i]()}
resulting in "hi there"
I think this is called anonymous functions in some other codans.
func(){print "hi"}
func2(){print " there"}
tab[] funcs = {"func", "func2"}
for(int i = 0; i < 2; i++){
funcs[i]()}
resulting in "hi there"
I think this is called anonymous functions in some other codans.