Thanks for reading my question. I apologize if this seems like an easily searchable question, but searching for anything with variable, object, and java turns up anything and everything.
Here is what I would like to do:
BankCheck = check(variable int here) = BankCheck(params here);
So that I can create check1000, then check1001, check1002 and so on.
Any suggestions?
Thank you!
EDIT:
Here is what I used:
ArrayList<Check> check = new ArrayList<Check>();
And the this to add each new object to the array.
check.add(checkNum, new Check(details, amount));
Not, that’s not possible but you have two options
1.- Create and array to hold a variable number of checks:
That will let you store 100 checks. You can also use a list:
Which works almost the same, except you don’t have a fixed number of checks.
2.- The other option is to create an small program to create this for you and then you just copy paste the output:
But unless you’re trying to do something really advanced ( or stupid ) you really will use option #1 most of the times.
I hope this helps