标题:java set那里错了 看看主方法就可以了
取消只看楼主
gxl741852
Rank: 1
等 级:新手上路
帖 子:27
专家分:0
注 册:2010-6-29
结帖率:100%
已结贴  问题点数:6 回复次数:1 
java set那里错了 看看主方法就可以了
package javaapplication7;
class Yuangong{
private String Xm;
private String bm;
private int xs;
private double gh;
public Yuangong(double hg){
System.out.println(getgh());
}
public Yuangong(double hg,String Xm){
System.out.println(getgh()+getXm());
}
public Yuangong( ){
System.out.println("  a");
}
public Yuangong(double hg,String xm,int xs,String bm){
System.out.println(getgh()+getXm()+getxs()+getgh());
}
public String getXm(){
return Xm;
}public void getXm(String Xm){
this.Xm=Xm;
}
public String getbm(){
return bm;
}public void getbm(String bm){
this.bm=bm;
}
public int getxs(){
return xs;
}public void getxs(int xs){
this.xs=xs;
}
public double getgh(){
return gh;
}public void getgh(double gh){
this.gh=gh;
}
}
public class Main {
    public static void main(String[] args) {
       Yuangong s=new Yuangong();
       s.setXm("xiaosan");
       s.setgh(01.0);
       s.setbm("erhaobumen");
       s.setxs(10000);
       s.Yuangong();
         s.Yuangong( s.setgh(01.0));
    }

}
搜索更多相关主题的帖子: java set 
2010-07-05 20:18
gxl741852
Rank: 1
等 级:新手上路
帖 子:27
专家分:0
注 册:2010-6-29
得分:0 
e   粗心了  唉   版主感谢了
2010-07-06 10:02



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-312209-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.023250 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved