I have an interface defined as
interface ListItem {
public String toString();
public String getUUID();
}
And a class (BrowseItem
) implementing that interface. When I try:
ArrayList<ListItem> = (method returning ArrayList of type BrowseItem)
I get an incompatible type error (found ArrayList<BrowseItem>, require ...<ListItem>
)
Am I approaching this wrong?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…