r/IntelliJIDEA • • Apr 01 '24

Scanner Java

Post image

Hello, why does this not work? Can anyone help me please I’m new to IntelliJ and programming!

1 Upvotes

10 comments sorted by

3

u/ElizabethsSongbird Apr 01 '24

What are the exact error messages you're getting?

0

u/Sad-Meal-6299 Apr 01 '24

hello it says: Cannot Resolve symbol ‘Scanner’ OR Cannot Resolve symbol ‘println(String)’

1

u/ElizabethsSongbird Apr 01 '24

Like another commenter pointed out, is your JDK set up properly? You can check that in project structure

-4

u/Sad-Meal-6299 Apr 01 '24

okay I have no idea tbh I’ll take a ss and do a new post could you check it out?

1

u/CLOVIS-AI Apr 02 '24

Go into “file → project structure”, find the JDK drop down and choose something recent (at least 17). If you don't have any in the drop-down, there should be a button to download one, choose Eclipse Temurin (again, at least 17).

You have this error message because IntelliJ cannot find the JDK, probably you have none selected?

1

u/Sad-Meal-6299 Apr 02 '24

Hello you’re probably right ! I’m trying to figure out where I can select it now, thank you so much!

15

u/parkan Apr 01 '24

setup JDK

watch tutorials

1

u/backstreetatnight Apr 01 '24 edited Apr 01 '24

Restart and invalidate caches if your JDK is already set

-24

u/IronMan8901 Apr 01 '24

It should work the error is ithing due to unused variables

1

u/Sad-Meal-6299 Apr 01 '24

oh okay thank you!