Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
475 views
in Technique[技术] by (71.8m points)

<T extends Comparable<T>>和implements comparable<T>有什么用法上区别吗

<T extends Comparable<T>>和implements comparable<T>有什么用法上区别吗


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

<T extends Comparable<T>> 这是泛型,类型是Comparable及其不确定的某子类

implements Comparable<T> 这是实现接口,类型还是T,确定的T


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...