怎么访问数据库中的float类型的值,错误提示为The method getFloat(int) in the type ResultSet is not applicable for the arguments (float)
getFloat("price"),参数应该是字段名,不是你定义的返回值变量
报错是因为price未定义这个变量吧,而且getFloat方法的参数类型有两种:
索引的方式(int类型)、字段名方式(String类型)
你的sql语句不是只查询了title么,应该查出需要的三个字段呀
您好,我是有问必答小助手,您的问题已经有小伙伴帮您解答,感谢您对有问必答的支持与关注!