
src.samples.java.ex.MTA_Sample Maven / Gradle / Ivy
package ex;
import java.util.Iterator;
import java.util.List;
public class MTA_Sample {
public String[] testForCopy(List l) {
String[] result = new String[l.size()];
for (int i = 0; i < l.size(); i++) {
result[i] = l.get(i);
}
return result;
}
public String[] testIterCopy(List l) {
String[] result = new String[l.size()];
Iterator it = l.iterator();
int i = 0;
while (it.hasNext()) {
result[i] = it.next();
i++;
}
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy