public class StaticTest
{
public static void main(String[] args)
{
System.out.println("\n\t\t如何实现静态方法调用非静态方法有哪些\n");
//开始调用,匿名调用!
new StaticTest().show();
//创建对象调用!
StaticTest st=new StaticTest();
st.show();
}
//非静态方法!
void show()
{
System.out.println("非静态方法show.....!");
}
}
把非静态方法的改为静态的,没什么影响的