public Cons(T car,Cons<T> cdr){
  this.car=Objects.requireNonNull(car);
  this.cdr=cdr;
}

public Cons ( T car , Cons < T > cdr ) { this . car = Objects . requireNonNull ( car ) ; this . cdr = cdr ; }
constructs a new cons list .
