I have a problem, that I want to solve, but I dont have the knowledge to do it yet.
Is there a possibility I can put any Method into the parameter list anytime?
For Example:
public void goThroughArray(anyMethod()){
for (int i = 0; i<array.length;i++){
anyMethod();
}
public int[] copyArray(int[]arrayName2){
arrayName1[i] = arrayName2[i];
}
//in main
goThroughArray(copyArray(int[]arrayName);
Is that possible?