/**
* 彦舜原创,优快云首发
*/
package cn.yanshun.design;
/**
* @author 彦舜
*
*/
public class Test3_Design {
/**
*
*/
public Test3_Design() {
// TODO Auto-generated constructor stub
}
/**
* @param 这个类用于在程序开发设计中,面向对象中,面向接口编程思想,的应用
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
//使用、测试接口或抽象类,通过实例化对象的创建,进行测试、使用:创建多态对象
//报小黄线:The value of the local variable t1 is not used
Teacher1 t1 = new Student();
t1.eat();
t1.sleep();
t1.love();
//static数据,类名或接口名直接调用,位于内存中的公共数据区/公共代码区
//t1.statics(); //报错:This static method of interface Teacher1 can only be accessed as Teacher1.statics
Teacher1.statics();
//static数据,类名或接口名直接调用,位于内存中的公共数据区/公共代码区
// System.out.println(t1.ACCOUNT); //报小黄线:The static field Teacher1.ACCOUNT should be accessed in a static way
System.out.println(Teacher1.ACCOUNT); //报小黄线:The s