33 lines
485 B
Java
Executable File
33 lines
485 B
Java
Executable File
class INT{}
|
|
class list<A>{
|
|
A a = null;
|
|
list<A>next = new list();
|
|
void insert(A elem){
|
|
if(a = null){
|
|
a=elem;
|
|
}
|
|
else{
|
|
next.insert(elem);
|
|
}
|
|
}
|
|
void get(A elem){
|
|
|
|
System.out.println(elem);
|
|
|
|
next.get(elem);
|
|
|
|
}
|
|
}
|
|
|
|
class main extends list<list<INT>> {
|
|
|
|
list <INT>l = new list();
|
|
void main(){
|
|
list<INT>s= new list(), <INT>l = new list();
|
|
INT i = new INT();
|
|
}
|
|
}
|
|
|
|
|
|
|