0
package com.company;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        System.out.println("hello world !");
    }
}

It says that Scanner cannot resolve symbol

Ivar
  • 6,138
  • 12
  • 49
  • 61
Kaydo
  • 1
  • 1
    Hard to tell without more info. Assuming you're using at least Java 5 the IDE should pick up the class so maybe you've misconfigured your project or it's a hickup in the IDE (I know this more from Eclipse than from IntelliJ though). – Thomas Nov 08 '21 at 10:33
  • 1
    Have you configured your JDK? Because `println` is also marked red. – QBrute Nov 08 '21 at 10:38
  • 1
    Looks like a duplicate of [IntelliJ can't find Scanner class](https://stackoverflow.com/questions/26703091/intellij-cant-find-scanner-class), but it doesn't really have a good answer. You can try Anton Dozortsev's suggestion and [Invalidate IntelliJ's caches](https://stackoverflow.com/questions/26703091/intellij-cant-find-scanner-class#comment42001040_26703091). – Ivar Nov 08 '21 at 10:38

0 Answers0