Reputation: 489
When I input List
in Intellij, it doesn't automatically provide a prompt for importing java.util
. I have to import java.util.List
manually.
When I write java.util
, it doesn't prompt to add List
, but instead ArrayList
.
Upvotes: 42
Views: 24865
Reputation: 4912
If anyone faces this issue in Netbeans, The answer @AyushDhakal works, closing and reopening Netbeans fixes the error.
Upvotes: 0
Reputation:
There are few issues in code completion in versions 2022 and above. of course manually import the package sort the issue. Based on my understanding the issue reproduced the time the UI is busy updating maven indexes especially when memory is low
Upvotes: 0
Reputation: 18911
Please check File | Settings | Editor | General | Auto Import | Exclude from Import and Completion. If java.util.List
is there, remove it.
Upvotes: 113
Reputation: 3443
in my case, suddenly nothing from java.* was recognized. tried setting different JDK's in File->ProjectStructure, then File->Invalidate Caches/Restart made it work again!
Upvotes: 10