>> I hava an important question. What would it be the best method to treat >> constant objects in java?
Make a class(es) and define your constants there, then import it statically. Make your constants public static and final. You may want to implement some of the constant as Enums (http://docs.oracle.com/javase/1.5.0/docs/guide/language/enums.html). Good luck with your project. Regards, Peter On 4 April 2012 17:32, Andreas Prlic <[email protected]> wrote: > I recommend a very good read - Effective Java from Joshua Bloch. > > also there are a couple of good online articles about the topic of > immutable objects. > > Andreas > > On Wed, Apr 4, 2012 at 8:06 AM, Dragos-Bogdan Sima > <[email protected]> wrote: >> Hello, >> >> I hava an important question. What would it be the best method to treat >> constant objects in java? >> I am thinking to write an Immuble interface that provides API for just the >> const methods. Then if I return or pass objects of type immubable, the >> degree of safety would be the same as in C++. >> >> Thank you, >> Dragos. > _______________________________________________ > Biojava-l mailing list - [email protected] > http://lists.open-bio.org/mailman/listinfo/biojava-l _______________________________________________ Biojava-l mailing list - [email protected] http://lists.open-bio.org/mailman/listinfo/biojava-l
