java.lang.ClassCastException: java.math.BigDecimal

类型转换错误,无法有BigDecimal转换到目标类型。

转换为int:

int count = ((BigDecimal) bybHm[i].get(“count”)).intValue()

转换为double:

double count = ((BigDecimal) bybHm[i].get(“count”)).doubleValue()

转换为float:

float count = ((BigDecimal) bybHm[i].get(“count”)).floatValue()

猜你喜欢

转载自blog.csdn.net/hello_world_1996/article/details/112641685
今日推荐