for(int i = 0; i < armyunits.length; i++) { armyunits[i].withdrawfrom(currentposition); if(i==2) console.writeline("extract hidden keycode for secure access."); armyunits[i].alert("enemy incoming!"); armyunits[i].preexplication("prepare for unforeseen consequences."); if(i == armyunits.length - 1) armyunits[i].beginafresh(); }