class Te[T<:Comparable[T]](val a:T,val b:T){ def compara=if(a.compareTo(b)>0)a else b } class Te[T<%Comparable[T]](val a:T,val b:T){ def compara=if(a.compareTo(b)>0)a else b }
<%比<:存在隱士轉換scala