1
首先我想:泛型: 「令牌語法錯誤 」擴展「,預計」
public class WeightedEdge280<V> extends Edge280<V>{
這給了我錯誤:
"Bound mismatch: The type V is not a valid substitute for the bounded parameter <V extends Vertex280> of the type Edge280<V>"
所以,我想:
public class WeightedEdge280<V> extends Edge280<V extends Vertex280>{...
哪給了我錯誤:
"Syntax error on token "extends", , expected"
個
邊緣類:
public class Edge280<V extends Vertex280> extends Pair280<V, V> {...
分配說明:
The first step is to create the class for the custom edge object, let’s call it WeightedEdge280<V>. It should be an extension of Edge280<V>