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

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -