Actually there is no such class which extends Object[]
; each array has a fixed type and its own class, for exampleMyClass[].class
You should use a typed method:
public <T> void m(List<T[]> objs){
objs.stream()
.map(oa -> oa[0])
.forEach(System.out::println);
}
source
share