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() )
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...
Originally posted by rama murthy:
Here is the code to remove hard-coding path.