(LinkedListNode node)
| 30 | } |
| 31 | |
| 32 | public static int linkedListToInt(LinkedListNode node) { |
| 33 | int value = 0; |
| 34 | if (node.next != null) { |
| 35 | value = 10 * linkedListToInt(node.next); |
| 36 | } |
| 37 | return value + node.data; |
| 38 | } |
| 39 | |
| 40 | public static void main(String[] args) { |
| 41 | LinkedListNode lA1 = new LinkedListNode(9, null, null); |