package private static member class vs. package private class

Posted by Helper Method on Stack Overflow See other posts from Stack Overflow or by Helper Method
Published on 2010-05-14T10:46:10Z Indexed on 2010/05/14 10:54 UTC
Read the original article Hit count: 209

Filed under:
|
|

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.

© Stack Overflow or respective owner

Related posts about java

Related posts about ood