This is a valid question. Such a thing is possible in other languages. In C#, prefix the identifier with @ (as asked before); in Delphi, prefix with &. But Java offers no such feature (partly because it doesn't really need to interact with identifiers defined by other languages the way the .Net world does).

Answer from Rob Kennedy on Stack Overflow
🌐
ThoughtCo
thoughtco.com › reserved-words-in-java-2034200
Reserved Words in Java
January 27, 2019 - Paul Leahy is a computer programmer with over a decade of experience working in the IT industry, as both an in-house and vendor-based developer. ... Reserved words are words that cannot be used as object or variable names in a Java program because they're already used by the syntax of the Java programming language.
🌐
GeeksforGeeks
geeksforgeeks.org › java › reserved-words-in-java
Reserved Words in Java - GeeksforGeeks
October 6, 2025 - They cannot be used as variable names, method names, class names, or identifiers, because they are part of the syntax of Java. Java reserves some words to represent predefined functionalities. These words are called reserved words.
🌐
W3Schools
w3schools.com › java › java_ref_keywords.asp
Java Keywords
Java has a set of keywords that are reserved words that cannot be used as variables, methods, classes, or any other identifiers:
🌐
Javatpoint
javatpoint.com › java-reserved-keywords
Java Reserved Keywords - Javatpoint
Java Reserved Keywords with java tutorial, features, history, variables, object, programs, operators, oops concept, array, string, map, math, methods, examples etc.
🌐
Computer Hope
computerhope.com › jargon › j › java_reserved_words.htm
What Are Java Reserved Words?
Java reserved words are keywords that are reserved by Java functions or other uses that cannot be used as identifiers (e.g., variable names, function names, class names). If a reserved word was used as a variable, you would get an error or unexpected result. The following table lists the reserved words in Java.
🌐
Medium
medium.com › codestorm › reserved-words-in-java-f71e7260933f
Reserved words in Java. Here is a list of keywords in the Java… | by Asep Saputra | Code Storm | Medium
July 3, 2021 - Here is a list of keywords in the Java programming language. You cannot use any of the following as identifiers in your programs. The keywords const and goto are reserved, even though they are not currently used.
🌐
EXLskills
exlskills.com › courses › java basics › java basics
Reserved words | Java Basics - EXLskills
August 1, 2018 - In Java, there are keywords that are reserved for the use of Java functions or other uses that cannot be identifiers like variables, classes and function names. When a reserved word is used as a variable, we will get an error or some other ...
Find elsewhere
🌐
Dot Net Tutorials
dotnettutorials.net › home › identifiers and reserved words in java
Identifiers and Reserved Words in Java - Dot Net Tutorials
April 21, 2022 - There is no length limit for java identifiers but it is not recommended to take too length identifiers. We can’t use reserved words as identifiers otherwise we will get a compilation error. i.e., int if = 20; here we will get compilation error. All predefined java class names and interface names we can use as identifiers. i.e., int String = 20; here we won’t get any compilation error.
🌐
Edureka
edureka.co › blog › java-keywords
What are Java Keywords and reserved words? Edureka
June 17, 2021 - Keywords are predefined which have a unique meaning and functionality in Java programming language. These keywords are also known as reserved keywords which mean they cannot be used as a variable name, class, method or any other identifier. There are 57 reserved keywords in Java.
🌐
Medium
medium.com › @rasulattar0705 › a-comprehensive-guide-to-java-reserved-words-b82a50569125
A Comprehensive Guide to Java Reserved Words | by Rasul Attar | Medium
December 12, 2024 - class, interface, extends, implements, package, import ... All reserved words are lowercase. Java is case-sensitive, so reserved words like Int or InstanceOf are invalid.
🌐
Wikipedia
en.wikipedia.org › wiki › List_of_Java_keywords
List of Java keywords - Wikipedia
October 20, 2025 - In the Java programming language, a keyword is any one of 68 reserved words that have a predefined meaning in the language. Because of this, programmers cannot use keywords in some contexts, such as names for variables, methods, classes, or as any other identifier.
🌐
Medium
medium.com › @lk.snatch › java-reserved-keywords-29618c31a797
Java reserved keywords.
February 6, 2020 - Java reserved keywords. Programming languages have always reserved keywords, that cannot be used in a particular context. Wanna write «String class = “I can do anything!”»? You can write that …
🌐
EXLskills
exlskills.com › courses › java syntax › java syntax
Reserved words | Java Syntax - EXLskills
August 22, 2018 - In Java, there are keywords that are reserved for the use of Java functions or other uses that cannot be identifiers like variables, classes and function names. When a reserved word is used as a variable, we will get an error or some other ...
🌐
Software Testing Help
softwaretestinghelp.com › home › java › important java keywords list – reserved words in java
Important Java Keywords List - Reserved Words In Java
April 1, 2025 - Despite that, if we use these keywords it will result in a compiler error. ... Answer: Java has a total of 51 keywords that have predefined meaning and are reserved for use by Java.
🌐
Scribd
scribd.com › document › 894083840 › java-doc
Java | PDF | Reserved Word | Method (Computer Programming)
The document provides an overview of Java identifiers, including rules for their definition, such as allowed characters, case sensitivity, and restrictions on starting with digits or using reserved words. It also lists the 53 reserved words in Java, categorizing them into keywords for data types, flow control, modifiers, exception handling, class-related keywords, and object-related keywords.
🌐
Wikipedia
en.wikipedia.org › wiki › Reserved_word
Reserved word - Wikipedia
October 17, 2025 - In an imperative programming language and in many object-oriented programming languages, apart from assignments and subroutine calls, keywords are often used to identify a particular statement, e.g. if, while, do, for, etc. Many languages treat keywords as reserved words, including Ada, C, ...
🌐
Oracle
docs.oracle.com › javase › tutorial › java › nutsandbolts › _keywords.html
Java Language Keywords (The Java™ Tutorials > Learning the Java Language > Language Basics)
Here is a list of keywords in the Java programming language. You cannot use any of the following as identifiers in your programs. The keywords const and goto are reserved, even though they are not currently used.
🌐
Saylor Academy
learn.saylor.org › mod › book › view.php
Small Java Programs: Identifiers and Reserved Words | Saylor Academy
It is conventional for a class name to start with a capital letter, but this is not required by the compiler. However, follow this convention so your programs are easier to understand. A source file should always end with .java in lower case. A reserved word is a word like class that has a special meaning to the system.