I have a lot of functions and want to use an array to call them. I know how to do it in c++ but dont know how to do it in java. Pseudocode of my intention bellow:
Array<function pointers> functionBook[100];
functionBook.add(function_0);
functionBook.add(function_1);
.
.
.
functionBook.add(function_99);
void functionCaller(int i){
functionBook[i](); // will call function_i()
}