This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I'm trying to use Class.forName to give me one of several named classes. I have a parent Abstract class that has a common abstract method that each child implements. When I try: ParentClass myClass = Class.forName("childClassString"); myClass.implementedAbstractMethod(data); The compiler gives me a "type mismatch" error. When I change ParentClass to Class then I get a "method not defined" error. I've tried casting but it doesn't appear to clear my problems. Any clues anyone?