Being new at Java programming, please bear with me
Using reflection, I run into a problem I hope someone can help me with...
Field f = someClass.getDeclaredField("fieldName");
Object fieldValue = f.get(someClass);
This is possible, but what if I don't want to use object but cast the result of f.get to a class... but this class is unknown till runtime; is that possible to do, and how should it be done?
Class x = anotherClass.newInstance();
x objectX = (x) f.get(someClass);