Preview features enabled at an invalid source release level 15, preview can be enabled only at source level 16Java(2098258) code example
Example: Preview features enabled at an invalid source release level 15, preview can be enabled only at source level 16Java(2098258)
ctrl + shift + p.
Write to the command palette: Clean the Java language server workspace.
Press enter (restart your VScode).