package com;
public interface ITest {
public void test();
}
===========================================
package com;
public class Test1 implements ITest {
@Override
public void test() {
// TODO Auto-generated method stub
System.out.println("调用成功");
}
}
======================================
package com;
public class Test2 {
private static ITest iTest;
public static void main(String[] args) {
// TODO Auto-generated method stub
iTest.test();
}
public ITest getiTest() {
return iTest;
}
public void setiTest(ITest iTest) {
this.iTest = iTest;
}
}
为什么返回值为null???第一次用sf,求大神指点
慕容森
宝慕林4294392
摇曳的蔷薇
慕村9548890
相关分类