Java – link list class and default linked list class from scratch?

As a project / assignment student, I have been writing my linked list data structure. I want to know whether "real world" developers must write their own linked list DS or use any objects in the provided linked list Java document Which is better & under what circumstances?

Solution

The custom LinkedList implementation is likely to be more effective because it allows you to optimize as needed, but JDK's LinkedList is always better than its reusability and maintainability advantages:

>No one needs to maintain the implementation of LinkedList. > Any additions to the list interface will be automatically inherited in the future. > Developers who read the code will immediately understand what is happening. > The collections API has many useful and practical methods to use. > Your LinkedList will be compatible with many third - party libraries that use list

If you decide to create a custom list implementation, you can choose to extend abstractsequentiallist for #2, #4 and possible benefits

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>