Java 在使用Conllections中的bianarySeach ()方法时报错 no instance(s) of type vaiable(s) T text so that Student conforms to Comparable 异常处理
时间:2019-07-26 21:37:17
收藏:0
阅读:2633
异常类型:checked 异常,无法通过编译,具体情况如下所示
异常原因:如IDEA所提示,变量list没有合适的类型
处理方式:去掉ArrayList后面的泛型
|--处理后
评论(0)