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
Post a Comment