How do I make a progression with a variable in Java? -
i interested in how call variable changes, such customer1, customer2, customer3, etc. these customer variables populated in particular class. program automatically type number when perform such customer1.returnname(); if user types 1. without me making case case code. user type number of customer , automatically uses number. function best this?
if have numbered variables, use list.
arraylist<customer> customers = new arraylist<customer>(); customers.add(new customer("name")); customers.get(0).returnname();
Comments
Post a Comment