Guys , need you're help I have a generic class where i have 2 ArrayLists which must extends type of class How can i add an object to these lists?
someClass<T>{ ArrayList<? super T> list = new AreayList<>(); public <Y extends T> boolean addSomeThing(Y y) { return list.add(y); } } }
Anyone tell me. Is it possible to make bidirectional sort by choice in Java?
U really thinking that few words will explain same things as 1.5 hours video?