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));
}
}