youngyangyang04/Skiplist-Java

Java强制类型转换问题

Closed this issue · 0 comments

从磁盘加载数据到内存中,调用了getKeyValueFromString()函数,在该函数里面进行了类型转换,将String转换成对应的泛型,当指定泛型类型为 Integer 时,程序报错了,class java.lang.String cannot be cast to class java.lang.Integer