regards<br />Rajeshwari. N
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
I have no java certifications. This makes me a bad programmer. Ignore my post.
Originally posted by Lewin Chan:
Depends on the situation.
Generally a class not an interface. However, if I have a class full of private constants (and code), and suddenly the constants need to be exposed to a.n. other package/class, then I almost always use an interface. That is just because I'm lazy, implement an interface, and you inherit all those constants with no code changes.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Stan James:
Sun seems to agree in that the 1.5 JDK has a new construct just for this kind of thing. Darned if I can remember the name right now!
Anyhow, I don't use the interface technique. It seems right to me for a class to own the constants and for those who use them to acknowledge the dependency by referencing the class. Counterpoint?
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Originally posted by Stan James:
Um, TableMarkup?
Seriously, if it was easy, they wouldn't pay us so much.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Ilja Preuss:
I do have a TableMarkupWriter and a TableMarkupReader class. Which one should own the constants?
Originally posted by Allan Halme:
My convention would be a TableMarkupConstants class.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Originally posted by Ilja Preuss:
How do you reference the constants in the Writer and Reader?
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
I brought this back from the farm where they grow the tiny ads:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|