'intellij println declaration [closed]

I am trying to use ''sout'' keyword in intellij for calling system.out.println() quickly but it seems like doesnt work. Looks like, I have some problems in settings sections. Does anyone know the way the quick way problem

It Looks like this: I solved the problem it was all about defining println() inside a method.

It Looks like this

I solved it. The solution is that declaring the println() method within class or inside another method as well.

class Main {
    public static void main(String args[]) {   
             System.out.println(fun());
    } 
  
    int fun()
    {
      return 20;
    }
}


Solution 1:[1]

Yeah just use it inside in any method, like this:

Like this

Solution 2:[2]

According to Intellij support question

Make sure you are inside the method where this completion makes sense, not just inside the class.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mark Rotteveel
Solution 2 limido