Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reserved words in Java

Tags:

java

goto is a reserved word in Java.

Is it true?

Why so?

like image 653
abson Avatar asked Mar 27 '10 09:03

abson


People also ask

How many reserved words are there in Java?

In the Java programming language, a keyword is any one of 67 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.

What are reserved words give example?

Often found in programming languages and macros, reserved words are terms or phrases appropriated for special use that may not be utilized in the creation of variable names. For example, "print" is a reserved word because it is a function in many languages to show text on the screen.


1 Answers

Yes, goto is a reserved word in Java.

From the Sun Docs:

The keywords const and goto are reserved, even though they are not currently used.

like image 57
codaddict Avatar answered Sep 21 '22 02:09

codaddict