JavaCompilerCore/examples/OldExamples/hama/test3o.jav

21 lines
335 B
Plaintext
Raw Normal View History

2013-10-18 11:33:46 +00:00
class List<A>{
List <A>next = new List();
A object = null;
A getObjectAt(int n){
if(n==0){
return object;
}
else{
return this.next.getObjectAt(n-1);
}
}
void insert(A object){
if(this. Object == null){
this.object = object;
}
else{
this.next.insert(object);
}
}
}