i've been trying to create a generic who's type is defined at runtime but so far have failed, what I want to do is something like this
I know the above does not compile, but so far is the best example of what I want to do, first of all question is, is this even possible? if so, how do you assign a generic its type through reflection?public void define(object obj){ Class c = obj.getClass(); List<c> list = new ArrayList<c>; }