8
Why
public List<String> getList(){
if (isMyListOKReady())
return myList;
return Collections.emptyList();
}
compiles well, but for
public List<String> getList(){
return isMyListReady() ? myList : Collections.emptyList();
}
Eclipse says "Type mismatch: cannot convert from List<Object> to List<String>"?