KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
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>" ?
Tags (comma-separated)
Save Edits
Cancel