I just saw an implementation of a linked list in Java (http://www.danielacton.com/Data-Structures/Linked-List/Java/), and here's what a node looked like:
private class ListNode {
private Object data;
private ListNode next;
}
What the heck is that????
The size of a ListNode must be infinity bytes, if you think about the logic here. Shouldn't the ListNode hold the address of another ListNode?