I have delared an Arraylist I want it to be a generic type.
ArrayList<T> locker = new ArrayList<T>(); Then I have a method add which needs also to be generic.
public <T extends Gear> boolean add(Gear item) { locker.add(item);// this is giving me compile error => no suitable method found for add(Gear) return true; } how can I fix it, I am new to generic types as well.
SomeClass<T extends Gear>?