(String[] args)
| 38 | } |
| 39 | |
| 40 | public static void main(String[] args) { |
| 41 | LinkedListNode lA1 = new LinkedListNode(9, null, null); |
| 42 | LinkedListNode lA2 = new LinkedListNode(9, null, lA1); |
| 43 | LinkedListNode lA3 = new LinkedListNode(9, null, lA2); |
| 44 | |
| 45 | LinkedListNode lB1 = new LinkedListNode(1, null, null); |
| 46 | LinkedListNode lB2 = new LinkedListNode(0, null, lB1); |
| 47 | LinkedListNode lB3 = new LinkedListNode(0, null, lB2); |
| 48 | |
| 49 | LinkedListNode list3 = addLists(lA1, lB1, 0); |
| 50 | |
| 51 | System.out.println(" " + lA1.printForward()); |
| 52 | System.out.println("+ " + lB1.printForward()); |
| 53 | System.out.println("= " + list3.printForward()); |
| 54 | |
| 55 | int l1 = linkedListToInt(lA1); |
| 56 | int l2 = linkedListToInt(lB1); |
| 57 | int l3 = linkedListToInt(list3); |
| 58 | |
| 59 | System.out.print(l1 + " + " + l2 + " = " + l3 + "\n"); |
| 60 | System.out.print(l1 + " + " + l2 + " = " + (l1 + l2)); |
| 61 | } |
| 62 | } |
nothing calls this directly
no test coverage detected