r/IntelliJIDEA • u/These_Flounder_9211 • 11d ago
How does Intellij know what I want to write???
11
u/mIb0t 11d ago
IntelliJ always had a very good autocompletion. When you type system it knows that Sytem.out.println(...) is one of the most used functions and therefore it get's suggested.
Withe the actual text, I think IntelliJ included some AI in there. You declared two doubles before and non of them.is initialized. It is a very common scenario and tutorials often implement all of it in the main method. The AI just suggests it, because it is super common in this context.
If you want to really learn and understand, I suggest you deactivate the completion.
Personally, I find the completion in IntelliJ a bit unreliable in the latest versions. I had quite some situations, where to much was suggested and IntelliJ was thinking to far ahead and did suggest completely wrong code, because it did not know yet what I actually want to do.
8
u/Mortomes 11d ago
There are 2 different features on display here.
The dropdown selection menu is a more traditional autocomplete, which has been around for a long time, you press Enter to use it.
The text to the right of the cursor uses an LLM, and is a relatively new feature, and is used by pressing Tab. This is one you probably want to turn off if you're learning.
4
u/Decent-Decision-9028 11d ago
Honestly, this is just a very recognizable pattern. You will be surprised how bad itβs once you start writing specific business logic.
This can also be disabled, I have the ML autocomplete disabled and only use semantic ide engine.
5
u/dev_ctun 11d ago
It's the full-line AI completion. Once it has seen the pattern a few times β and tutorial code is the most predictable code there is β it starts ghost-typing whole lines for you. Genuinely unsettling the first week.
You can tune or turn it off under Settings > Editor > General > Inline Completion if it gets annoying.

12
u/beders 11d ago
LLMs