File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Naming convention for constants Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Naming convention for constants" Watch "Naming convention for constants" New topic
Author

Naming convention for constants

Ransika deSilva
Ranch Hand

Joined: Feb 18, 2003
Posts: 524
Hi All,
I got very confused when I read the naming convention for constants in the Sun coding standards. Pls consider this given situation.

class TestConstants {
public static final int ----------- (1)
private static final int ---------- (2)
public static final Logger ----------- (3)
private static final Logger ----------- (4)
}
Could you please let me know the naming conventions for the above stated constant value decelerations.

Thanks in advance. Regards.


SCJP 1.4, SCMAD 1.0<br />SCWCD, SCBCD (in progress)
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36486
    
  16
As far as I can remember you should be calling the constants MY_INT, MY_SECOND_INT, MY_LOGGER and MY_SECOND_LOGGER.
Ransika deSilva
Ranch Hand

Joined: Feb 18, 2003
Posts: 524
Thanks for the quick reply, I had the same idea, but now have some doubts, any different ideas or confirmations are mostly welcome. Regards
 
 
subject: Naming convention for constants
 
Similar Threads
Constants Class: Good or Bad Idea
constant - naming conventions
variable naming, private final statics
Writing logs to a single file from Multiple Classes
final instance variable