//主类
public class AA{
public static void main(String args[]){
System.out.println("11111");
//调用类BB
BB.p();//静态的东西是属于类的,因此要用: 类名.方法名()
//非静态的东西是属性对象的,因此要用:对象名.方法名()
BB obj = new BB();//obj是新new的一个对象
obj.abc();
}
}
class BB{
public static void p(){//静态的--有static关键字
System.out.println("很好很好");
}
public void abc(){//非静态的
System.out.println("abc...");
}
}