This part of the specification has not changed since the first edition of JLS. Below is the original version of the answer, which discusses attempts to find a use for const and goto in Java. Keywords are not used in Java. Thus, the question boils down to the following: "Is there a need in Java for const and goto and what should they do?
The offer was closed in Follow the link to view the analysis, in the outputs of which the problems associated with entering const are noted:. Adding const is too late now. Had this been added from 1.
This means that most methods will have to be marked const explicitly. Compatibility is a very important feature of the JDK. Arguably, the collection classes should be modified to indicate that the elements are const. Find centralized, trusted content and collaborate around the technologies you use most.
Connect and share knowledge within a single location that is structured and easy to search. I have noticed that there is the const keyword in Java. It reminded me of things like static and final variables there. From the JLS 3. The keywords const and goto are reserved, even though they are not currently used.
Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Skip to content. Change Language. Related Articles. Basics of Java. Operators in Java. Packages in Java. Flow Control in Java. Loops in Java. Jump Statements in Java. Instead of compiling, the Java program will instead give the following error:. Actively scan device characteristics for identification.
Use precise geolocation data. Select personalised content. Create a personalised content profile. Measure ad performance. Select basic ads. Create a personalised ads profile.
0コメント