Is it possible to write a block of code to check all, or all objects/variables of a certain type for a certain characteristic?
(Without creating an if statement for each)
Then set it to something if true or false.
Like if you had 3 variables and...
if(a=0||b=0||c=0){
//set any variable equal to zero to 4
}
preform the action described in the comment
Or, complex example, 4 arraylists of type integer:
List<Integer> even = new ArrayList<Integer>(), //positive even ints
odd = new ArrayList<Integer>(), //positive odd ints
negaodd = new ArrayList<Integer>() //negative even ints
negaeven = new ArrayList<Integer>(); //negative odd ints
Then something like:
if("AnyArray".isEmpty()){
whatever-array-is-being-tested/tried = null;
}
So that if any of the arrays ended up being empty, then instead of [], they would return "null".