[問題] generic type parameter bound?

看板java作者 ( )時間16年前 (2009/05/01 03:19), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/8 (看更多)
在 eclipse jdt 的 document 裡面看到這個: http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse.jdt.doc.isv/reference/api/org/eclipse/jdt/core/dom/TypeParameter.html http://tinyurl.com/TypeParameter 底下的 typeBounds list ,據我的理解是在 type declaration 裡面 宣告 generic type parameter 時可以用的 如: class Test<SomeType extends TypeBound0 & TypeBound1> 可是後面的註解黃字部份讓我覺得很奇怪: Returns the live ordered list of type bounds of this type parameter. For the type parameter to be plausible, there can be at most one class in the list, and it must be first, and the remaining ones must be interfaces; the list should not contain primitive types (but array types and parameterized types are allowed). type bound 可以放 array type 嗎? :Q 在什麼情況下可以放呢? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 164.67.164.220
文章代碼(AID): #19-VcqHU (java)
討論串 (同標題文章)
文章代碼(AID): #19-VcqHU (java)