Reserved words in Java

goto is a reserved word in Java .

It's true?

Why is that?

+7
java
source share
2 answers

Yes, goto is a reserved word in Java.

From Sun Docs :

The const and goto keywords are reserved, even if they are not currently in use.

+14
source share

Yes goto is reserved in java.

While goto is a reserved word in Java, its use is not allowed. You should consider using marked breaks or exception exceptions.

The goto keyword is used in java for direct control in a specific place.

0
source share

All Articles