Covariance in Java -


Why does the following not work in Java? It will work in C #:

  Public stable final list & lt; String & gt; Split (string string, four delimiters) {if ((str == null). "" .equals (str)) {New CopyOnRightAralyst & lt; String & gt; (); }}  

I get an error saying that this method is to be returned to the list. Does the CopyOnWriteArrayList List Interface apply Co-operation on Java does not apply to return value?

It looks like you are back to another for the branch < Code> list & lt; String & gt; .


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -