public Node reverseLinkedList(Node head){
if (head==null||head.getNext()==null){
return head;
}
Node newHead= reverseLinkedList(head.getNext());
head.getNext().setNext(head);
head.setNext(null);
return newHead;
}debug调试能走到第一个return ,程序还能走下去,return 不是方法返回么,这里如何理解
登录后可查看更多问答,登录/注册