How to declare a constant in Java?
Tuesday, February 15, 2011 Tuesday, February 15, 2011
Posted by Programming Documentation Blog
The statement of declaring a constant in Java is final
Code:
final static double PI = 3.14; final int DAY = 24;
PLEASE note that the constant name should be in CAPITAL LETTERS.
This entry was posted on Tuesday, February 15, 2011, and is filed under
Java
. Follow any responses to this post through RSS. You can leave a response, or trackback from your own site.
Subscribe to:
Post Comments (Atom)
Post a Comment