Hello everyone, I am learning
Java, and I would like to be able to do something.
I understand that switch statements allow for scenarios to be account for. I am trying to develop something in an object oriented manner, with abstract classes.
Could someone explain to me how I would be able to use a switch statement in the abstract class, then refer back to it at a later date.
I am looking for something that could do something like:
Case 1: return 10
case 2: return 20
case 3: return 30
then in another class return this value so I can add it to something else.
I hope I have been descriptive enough for someone to help me. Many thanks in advance!