Class name for a variable not working

Started by Idk name ig on

Topic category: Help with MCreator software

Joined Oct 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Class name for a variable not working

So it's not really an issue as it is a question because when i try to call a variable that i use for class names which is obviously called class but then it says that it doesn't work so i have to call it klass i don't mind just i'm curious as of why class isn't allowed

Joined Aug 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Because class is a Java…
Sat, 11/29/2025 - 03:37

Because class is a Java reserved keyword, so allowing it to users would simply cause problems and build errors. The same thing applies to other words such as switch, void, public, private, record, interface, extends, package, boolean, int, small, long, byte, char, new.