• + 3 comments

    That conditional is a bit ugly, why not

    if(head == null) return;
    ReversePrint(head.next);
    System.out.println(head.data);
    
    // OR
    
    if (head != null) {
       ReversePrint(head.next);
       System.out.println(head.data); 
    }