Lisp List in Java

Java program to implement lisp list class
import java.util.*;
//To create a class Lisp using to perform car() & cdr() functions
public class Lisp
{
    //To perform car() function
    public int car(List I)
    {
        Object ob=I.get(0);
        String st=ob.toString();
        System.out.println("Using a L.car() function");
        return Integer.parseInt(st);
    }
    //To perform cdr() function
    public List cdr(List I)
    {

        Object ob=I.remove(0);
        Object obj[]=I.toArray();
        System.out.println("Using a L.cdr() function");
        List list=Arrays.asList(obj);
        return list;
    }

    public static void main(String[] args)
    {
        //To add the integer value in the ArrayList
        List<Integer> I=new ArrayList<Integer>();
        I.add(3);
        I.add(0);
        I.add(2);
        I.add(5);
        //To print the Return values of Car(),Cdr() functions
        Lisp L=new Lisp();
        int val=L.car(I);
        System.out.println(val);
        List list=L.cdr(I);
        System.out.println(list);
    }
}


Output:
Using a L.car() function
3
Using a L.cdr() function
[0,2,5]