Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

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();
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #java #loop #object
ADD COMMENT
Topic
Name
1+9 =