仪器社区

Java的测试类 怎么写

杀阡陌马克天蝎 2017-04-02
public class Seller { String name; public Seller() { super(); } public Seller(String name) { super(); this.name = name; } public String getName() { return name; } public void setName(String name) { thi... public class Seller { String name; public Seller() { super(); } public Seller(String name) { super(); this.name = name; } public String getName() { return name; } public void setName(String name) { this.name = name; } public void sell1(Excelle excelle){ System.out.println("卖了一辆"+excelle.getType()+"id是"+excelle.getId()); } public void sell2(Regal regal){ System.out.println("卖了一辆"+regal.getType()+"id是"+regal.getId()); } public void sell3(Excelle excelle,int number){ System.out.println("我卖了"+number+"辆车"); for (int i=0;i
全部评论
public class TestClass {
public static void main(String[] args) {
Hello hello = new Hello();
String str = hello.getInfo();
System.out.println(str);
}
}
8 0 2017-04-03 0条评论 回复
您可能感兴趣的社区主题
加载中...
发布 评论