package com.sxt.Testinterface;
/**
* 测试接口,接口的实现
* @author buxiaowei
*
*/
public class TestInterface {
public static void main(String[] args) {
Volent v=new MyClass();
v.fly();
Honest h=new MyClass();
h.help();
}
}
interface Volent {
int MAX_AGE=100;
void test01();
void fly();
}
interface Honest{
void help();
}
class MyClass implements Volent,Honest {
public void test01(){
System.out.println(MAX_AGE);
}
public void fly(){
System.out.println("Hello world");
}
public void help(){
System.out.println("Hello ShangHai");
}
}