数据库查出来Map<String,String> map
(‘ss’,222);
去除数据转 int 报错 : cannot be cast to
解决方法:
1.先转String,再转想要的类型:String str = ((“id”));
((“id”).toString())
注意:如果put的是整型的话,那么可以直接强转,但是如果放进去是字符串的话,强转就要报如上错误了
相关文章
- java.lang.ClassCastException: com.sun.proxy.$Proxy* cannot be cast to***
- 将annaconda创建的环境打包(供离线使用)CondaPackError: Cannot pack an environment with editable packages
- is not active, cannot reload.
- JSON parse error: Cannot deserialize instance of `` out of START_ARRAY token;
- Intelli IDEA:Cannot connect to already running IDE instance. Process xxx is still running的原因及解决方法
- ssm框架使用MybatisPlus在配置sqlSessionFactory时报“Cannot resolve class ‘MybatisSqlSessionFactoryBean‘”
- 关于VS2008+Win7出现error MSB3216: Cannot register assembly
- pip安装imageio失败Cannot unpack file,cannot detect archive format
- 【Python】ERROR: Cannot determine archive format
- ERROR: Cannot unpack file C:\Users\ljy\AppData\Local\Temp\pip-unpack-w28ochjw\ (downloaded