Could try harder
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
Could try harder
Take this one step further and you could list the supported printers and their classes externally, say in a properties file. Now you can have a truly flexible system that allows for runtime creation of the supported printers! (using Class.forName(..) and Class.newInstance() )
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 S Thanigaivel:
I don't want switch case to be part of my code...
is there any better idea that replaces the switch case...
Thanks!
Tony Morris
Java Q&A (FAQ, Trivia)
Originally posted by rama murthy:
Here is the code to remove hard-coding path.