请告诉我怎么才能看到hello testa proccess,非常感谢!!
在vistdb.java中
try{
Ifunc business = (Ifunc) Class.forName("dataoperate.testa").newInstance();
((IBussProc)business).process();
}
catch(ClassNotFoundException e)
{
System.out.println(e.getMessage());
}
catch(Exception e){
System.out.println(e.getMessage());
}
IBussProc.java
public interface IBussProc {
boolean process() throws Exception;
}
Ifunc.java
public interface Ifunc {
boolean process() throws Exception;
}
dataoperate.testa.java
public class testa implements IBussProc{
public testa() {
}
public boolean process() {
System.out.println("hello testa proccess");
return false;
}
}
为什么接收到的信息,指示为null
请指教