I have written a class which defines a bunch of constants which are private to the implementation of that class, ie. declared as
private static int foo
I know that the usual conventions guide that public defined class constants should be capitalized (and perhaps make use of underscores for longer names) but is it conventional or unorthodox to use capitalization in the naming of private final variables within a class definition.
It is always the best practice to use the conventions, It makes the code easy to read as well as if makes others understand the code when they use it. However when we talk about the specific area that you have asked in your post, It doesn't make a difference. The code will anyways compile if the logic and syantax is correct.
Impossible is I M Possible
Joined: Sep 15, 2004
Thanks for the answers.
I've adopted capitalization for the declaration of my private final variables since that seems to be the adopted practice regardless of access scope for class constants.