JavaCompilerCore/examples/OldExamples/hama/test33.jav

29 lines
334 B
Plaintext
Raw Normal View History

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