import java.util.ArrayList;
public class test {
public static void main(String[] args) {
ArrayList ar = new ArrayList();
for(int i=0; i<= 5; i++) {
moo a = new moo();
a.setHost("127.0.0.1");
a.setOS("SexualOS");
ar.add(a);
}
for (int n=0; n <= 5; n++) {
moo b = new moo();
b = ar.get(n);
String hos = b.host;
System.out.print(hos);
}
}
}
import java.util.ArrayList;
public class moo {
String host;
String os;
public void setHost(String h) {
host = h;
}
public void setOS(String i) {
os = i;
}
public String retHost() {
return host;
}
public String retOS() {
return os;
}
}