if java has provided the LinkedList class that would make your life a lot easier ... what would be a good reason for a developer not to use the provided LinkedLIst and build own LinkedList from scratch
Asked
Active
Viewed 138 times
-1
-
3Considering you hardly have a reason to use `java.util.LinkedList`... basically never. – Andy Turner Feb 17 '18 at 18:36
-
2Because otherwise you fail the class. Can't think of any other reason. – Elliott Frisch Feb 17 '18 at 18:37
-
1If you are asked to in the coding interview.. – Jerry Sha Feb 17 '18 at 18:38
-
A developer may hope to improve [some of the properties](https://stackoverflow.com/questions/322715/when-to-use-linkedlist-over-arraylist/322742#322742) of `LinkedList`. – lexicore Feb 17 '18 at 19:39
1 Answers
1
LinkedList
implementation in Java is a Doubly-linked list. So it will take more memory space than Singly linked list. So, if your application is too much memory critical then you can think to implement a Singly linked list implementation. However, some operation in a Doubly-linked list is faster than a single linked list, you need to keep in mind the performance aspect also.

Amit Bera
- 7,075
- 1
- 19
- 42