You are viewing a single comment's thread. Return to all comments →
this code is similar to yours but it gives a null pointer exception.can you explain why?
if(head==null){ return; } else{ head=head.next; ReversePrint(head); System.out.println(head.data); }
Seems like cookies are disabled on this browser, please enable them to open this website
Print in Reverse
You are viewing a single comment's thread. Return to all comments →
this code is similar to yours but it gives a null pointer exception.can you explain why?