First of all, I am a beginner in programming, so please don't expect me to now a lot about this.
I am working on a project for my programming course in computer science, where we use JUnit for tests provided by the professor.
As I was trying to solve a problem, the IDE asked if, I'd like to change to a preview version of Java. By doing so, implicitly declared classes were introduced. We are building an OOP project, so there are some files only containing classes, constructors instance methods as well as getter and setter for said objects. But no main-classes.
Now a specific class is divided and wrapped together somehow. All getters end up in a "parent"-class of the same name, while the rest (objects, their constructors, methods and setter) are in a file "wrappped" in the first. I describe it like that, because it is visible in the tree hierarchy on the left.
| |_ CustomerVO.java (final class) | |_CustomerVO.java
The parent one has a mouseover-message signaling it would be "final class" although, I never declared it as such.
Furthermore running the code results in this reacuring error-message: "Implicitly declared classes are not supported at language level '23'"
Well, duh. I don't want them to be supported. And I've never declared a class implicit. I don't even know exactly, what that means.
I changed the Java version in the Settings, deleted the file and redid it. Still. As soon, as it contains the getter methods, I am back in this weird situation.
What can I do?
All I tried all the before mentioned solutions trials:
- Deleting and re-writing the class
- downgrading java version inside intellijIDEA
- re-installing the whole IDE
- asking chatty, what to do. The AI just suggests to make some changes in the settings and ignore error-messages. Wasn't helpful, either.
- couldn't find a similar issue elsewhere on the web.