0

When we are try to instantiate java.util.LinkedList, It is suggesting LinkedList

enter image description here

Same way, When we are try to instantiate java.util.List, It is suggesting ArrayList

enter image description here

But, When we are try to instantiate java.util.List, It is suggesting only ArrayList and LinkedList is not an option.

enter image description here

Actually It is not a problem and manually we are able to do like

List<String> linkedList = new LinkedList<>();

But What my question is there any specific reason behind this?

AzarEJ
  • 552
  • 1
  • 5
  • 16
  • 4
    Presumably because `ArrayList` is a far more frequently used implementation of `List` than `LinkedList` is. – khelwood Apr 15 '20 at 12:51
  • 4
    Even Josh Bloch, who wrote LinkedList, [questions how useful it actually is](https://twitter.com/joshbloch/status/583813919019573248). – Andy Turner Apr 15 '20 at 12:54
  • Choose _Preferences_ item of _Window_ menu. In the _Preferences_ window, follow this path: Java > Editor > Content Assist > Advanced. Then see this _stackoverflow_ question: [Changing the behavior of the Eclipse auto-complete (Content Assist)](https://stackoverflow.com/questions/11590849/changing-the-behavior-of-the-eclipse-auto-complete-content-assist) – Abra Apr 15 '20 at 12:58

0 Answers0