- Nov 3, 2000
- 11,225
- 664
- 126
Assuming I correctly understand some things I've read about using Java's refelction package, it is possible to create an object of a certain type at runtime, using a variable containing the name of said object amongst other things (the types required by the objects constructor). However, since the object type is determined at runtime, it isn't possible to call a method from that object... the compiler won't allow this (due to type checking I assume). Is there any way to get around this problem? (Sorry if I'm not clear, I might add an example later.) Thanks!