Consider a simple case where I ask a user to select a fruit among 10 different fruits. Say the fruits are, apples, oranges, mangoes,... etc., If the user selects apples, I call apples(), if he selects mangoes, I call mangoes() and so on...
To select which function is to be called, I DON'T want to use a switch or if-else statements. How do I select which function is to be called during run-time?
NOTE : The programming language I am using is Java