Java generics - compiler error -


what's wrong method definition?

public static list<t extends myobject> t find() {  } 

compiler says:

syntax error, insert ";" complete methoddeclaration 

you have 2 return types there.

if wanted introduce generic type t be

 public static <t extends myobject>  list<t> find() {} 

Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -