I am using jdk 19 and want to make a record class for my Java project.
When I declare the class Person:
public record Person (String name) {}
I get the error
'class' or 'interface' expected
I don't understand why it will not let me use the record keyword.
Any help is appreciated
The records feature arrived in Java 16.
Project language level is selected to be 15, why didn't you change?