Difference in the value returned by the getCanonicalText() method when the code is built using IntelliJ version 2024.2

Likely, it’s not resolved. Either JDK is not configured in the project, or your source file doesn’t have a corresponding import statement.