I was writing two implementations of a Linked List for an assignment, a Doubly Linked List and a Circular Doubly Linked List. Now as the class representing a Link within the Linked List is the same in both implementations, I want to use it in both.
Now I wonder which approach would be better:
Implement the Link class as a package-private static member class in the first implementation and then use this class in the second implementation or make the Link class a package-private class.