Intellij insists on java.lang.Character
已回答
When i try to pass a char to a Character field IntelliJ keeps giving me an incopatible types error. Most recent example is when trying to pass a charAt() result to a Character field in a map structure. When i try the same code on my friends' IntelliJ or on an online Java compiler it works but on my machine it doesn't. The solution it offers to this is to write the Character field like java.lang.Character. I tried several jdk versions ranging from 14 to 16. I updated to the latest IntelliJ version 2022.1 too and it still persists. Any help is appreciated

请先登录再写评论。
Can't reproduce. Please try File | Invalidate Caches | Invalidate and Restart.
If the issue persists, please share your project: https://uploads.jetbrains.com.
Tried but the issue persists. Upload id: 2022_04_18_SMMAZYvYpCgRR641 (file: Test.zip)
You have your own class named Character which is used instead of java.lang.Character in the map.
To fix the problem you need to define the map like this:
Oh man... I feel dumb. Fixed! Thanks a lot for the quick and efficient response Mr. Serge. Have a good day.