package shiayn;
class value{
private int i;
public void set(int i){
this.i=i;
}
public int get(){
return i;}
public String toString(){
return ""+i;
}
}
public class shiyan {
public static void main(String[] args) {
value a[]=new value[10];
for(int i=0;i<a.length;i++){
a[i]=new value();
a[i].set(i);;
}
for(int i=0;i<a.length;i++){
System.out.println(a[i]);
}
}
}
Caballarii