The const keyword doesn't have any function in Java.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
"const" is a C++ keyword, the equivalent of "final". It's reserved in Java, presumably in case they ever decide to implement it. If they do, they will probably implement it in method parameters to let the compiler know that the values passed in cannot be modified. Currently, final works for parameters, but const would probably have one difference: When using final on an object reference, the reference itself is final, not the object. By using const, the object could be marked unchangeable, at least by the method that sees the const reference. Regards, Jeff
Give a man a fish, he'll eat for one day. Teach a man to fish, he'll drink all your beer.
Cheers, Jeff (SCJP 1.4, SCJD in progress, if you can call that progress...)
final keyword in Java can be used with: methods,variables and classes 1.if used with a method .the method cannot be overridden by a child class. 2.if used with a variable,the variable value remains constant 3.if used with a class,the class cannot be inherited i.e., no child of a final class.. hope this works.. Nischal