First off this is not a troll posting. I'm a C++ programmer who needs to write some
test Java code to test our system's ability to reverse engineer and round-trip Java 1.5 code - in this case generics. I'll try and keep this as brief as possible by using very cut down examples.
In C++ I can do this:
template<typename T> class Foo
{
public:
T *theT;
Foo()
{
theT = new T(); // Create an instance of whatever type T is
}
};
Can I / How do I - do the same kind of thing using Java Generics?
Many thanks for your time.