2 messages in net.java.dev.jna.users[jna-users] Defining & Maintaining co...
FromSent OnAttachments
Kunal ShahOct 27, 2008 3:34 pm 
Wayne MeissnerOct 27, 2008 4:21 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[jna-users] Defining & Maintaining constantsActions...
From:Kunal Shah (kuna@gmail.com)
Date:Oct 27, 2008 3:34:47 pm
List:net.java.dev.jna.users

In C: #define UNKNOWN_TYPE -1

In Java: public static final int UNKNOWN_TYPE = -1;

If the constant changes (:() for any reason or somebody adds a new constant, then the Java code also needs to be updated too. How to define the same constants in Java such that we can reduce this kind of duplication?

Thanks!