急求一个JAVA程序该怎么解决

[复制链接]
查看11 | 回复5 | 2011-11-20 18:07:12 | 显示全部楼层 |阅读模式
”自强才是王道“,嘿嘿...
回复

使用道具 举报

千问 | 2011-11-20 18:07:12 | 显示全部楼层
Integer.parseInt(this.theUser.getAccount())既然setAccount(String string)的参数是String的你还用Integer.parseInt转化成int的干什么啊?直接this.theUser.setAccount(this.theUser.getAccount())不就完了如果你的acco...
回复

使用道具 举报

千问 | 2011-11-20 18:07:12 | 显示全部楼层
this.theUser.setAccount((Integer.parseInt(this.theUser.getAccount())- Integer.parseInt(outputMoney))+" ");...
回复

使用道具 举报

千问 | 2011-11-20 18:07:12 | 显示全部楼层
不用吧,setAccount(String string),传入相对应得类型就好,不用转换,但是你在其他代码里使用的时候就麻烦啊。一开始把值计算好,以字符串形式传进去。如果是连接数据库操作,还是把它改了吧。...
回复

使用道具 举报

千问 | 2011-11-20 18:07:12 | 显示全部楼层
Integer.parseInt()这个方法就是把别的类型转换为int的,所以可能你得改改看看...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行