Line 14: error: not a statement
ListNode final = reverseList(head.next);
^
Line 14: error: ‘;’ expected
ListNode final = reverseList(head.next);
^
Line 14: error: illegal start of type
ListNode final = reverseList(head.next);
^
Line 17: error: illegal start of expression
return final;
^
Line 17: error: illegal start of type
return final;
^
5 errors
原因:
将关键字定义为了局部变量,就会出现上述错误。