Answers for "can you use an iterator to loop through objects"

3

java loop object

MyObject objects[] = new MyObject[6];
for (MyObject o: objects) {

    o = new MyObject();
}

MyObject objects[] = new MyObject[6];
for(int i = 0; i < objects.length; i++) {

    objects[i] = new MyObject();
}
Posted by: Guest on February-14-2020

Code answers related to "can you use an iterator to loop through objects"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language