Been given the task of creating a Wallet class where you can create members and transfer money between them. The user can then pick who gives the money and who receives it. Here is a little of the relevant code:
Wallet adamsWallet = new Wallet("Adam", 403.50);
Wallet bentsWallet = new Wallet("Bent", 873);
Wallet clarksWallet = new Wallet("Clark", 319.50);
object_name_here.transfer(other_object_name_here, 200);
So I want the user for example to enter "adam" in the Scanner, then somehow append "sWallet" to adam and then use that as the object name for the method call.
How can I do that or is there a better way of doing it?