package com.test;
public interface Performer {
void perform();
}
package com.test;
public class Juggler implements Performer{
private int beanBags = 3;
public Juggler(){};
public Juggler(int beanBags){
this.beanBags = beanBags;
}
public void test(){
System.out.println("ttt");
}
public void perform(){
System.out.println("JUGGLER " +beanBags+ " BEANBAGS");
}
}
package com.test;
public class Do {
Juggler juggler = new Juggler(15);
juggler.perform();
juggler.test();
}
我是在myecplise里面运行的,它就一直提示错误,但是我觉得这就是一个很简单的类
和方法的调用,不知道到底错在哪里了,问同学,同学也不知道。。。。。
下面是截图: