Im working with the following method:
public void m(List<? extends Object[]> objs){
objs.stream()
.map(oa -> oa[0]) //compile error
//array type expected
.forEach(System.out::println);
}
Why doesn't it work? I thought everything that extends array can be viewed as an array. Actually I can get length from the array.
Object[]?m(List<? extends Object[]> objs)tom(List<Object[]> objs)it compiles, but I'm not answering because I don't understand the implications of this change or what's wrong with your original.