aspose file tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes const keyword in  Java Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "const keyword in  Java" Watch "const keyword in  Java" New topic
Author

const keyword in Java

Kaarthick Ramamoorthy
Greenhorn

Joined: Sep 01, 2006
Posts: 23
Hi to all,

Why const keyword has been reserved in Java?. What is the purpose of reserving it?.
Praveen Babu
Ranch Hand

Joined: Jul 30, 2006
Posts: 138
From JLS,

The keywords const and goto are reserved, even though they are not currently used. This may allow a Java compiler to produce better error messages if these C++ keywords incorrectly appear in programs.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: const keyword in Java
 
Similar Threads
Final
Constants in Java
final and const
Questions on naming convention
Constant and Final