How do I specify a generic for an instance field?
How do I specify a generic for an instance field? What is the correct syntax?
For example how do I make an instance field of type T where T extends Sprite? I'm thinking something like the following but it doesn't seem to work:
private <T extends Sprite> Collection<T> someName;
For methods I can just write the following
public <T extends Sprite> void foo(Collection<T> param)...
but I'm not sure how to do this for a field. My class is not generic in itself and I do not wish it to be.