ex:
public class Game{
String level;
public void update(){
update+"level"(); //calls diff. method depending on variable
}
public static void setLevel(String lv){
level = lv;
}
private updateLevelOne(){
.....
}
private updateLevelTwo(){
.....
}
}
public class Level{......
Game.setLevel(One);
}
I know the top statement wont work. But I was wondering if its possible to make a call in such way that I wouldn't have to use a if/switch statement and go directly to the method.