42 lines
521 B
Java
Executable File
42 lines
521 B
Java
Executable File
class Inte
|
|
{
|
|
}
|
|
|
|
|
|
|
|
class Liststst3<A>
|
|
{
|
|
A ab = null;
|
|
Liststst3<A> next = new Liststst3();
|
|
|
|
void insert(A elem)
|
|
{
|
|
if(ab = null)
|
|
{
|
|
ab = elem;
|
|
}
|
|
else
|
|
{
|
|
next.insert(elem);
|
|
}
|
|
}
|
|
|
|
void get(A elem)
|
|
{
|
|
System.out.println(elem);
|
|
next.get(elem);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
class MainClass extends Liststst3<Liststst3<Inte>>
|
|
{
|
|
Liststst3 <Inte> li = new Liststst3();
|
|
|
|
void main()
|
|
{
|
|
Liststst3<Inte> sa = new Liststst3(), <Inte> li = new Liststst3();
|
|
Inte in = new Inte();
|
|
}
|
|
} |