I know there are many ways to get things done in a coding environment, but I'm wondering if what I'm doing follows logic.
I have a small section of code I'll copy as an example for how I go about declaring a list of objects:
Is there another form of doing this or am I along the right line of thinking?
List keysToCheck = new ArrayList(); ... addedToWorld(World world) { keysToCheck.add("1"); keysToCheck.add("2"); keysToCheck.add("3"); keysToCheck.add("4"); keysToCheck.add("5"); keysToCheck.add("6"); keysToCheck.add("7"); keysToCheck.add("8"); keysToCheck.add("9"); keysToCheck.add("0"); }