how to loop in array of obejct in java scropt code example Example: loop an array of objects in java for(Dog d : kennel) { d.bark(); }