---
title: "接口的测试interface"
author: "yangyingan"
date: "2013-12-26T17:52:10Z"
tags: ["Java"]
categories: ["编程语言"]
slug: "interface"
draft: false
lastmod: "2013-11-19T16:58:14Z"
id: 1977005
url: "https://yangyingan.iteye.com/blog/1977005"
---

//接口的测试interface
public interface mminterfance {
	//接口中只有两个东西：常量和抽象方法
	/*“public static final”在接口中这个是默认加的*/int y=0;
	abstract public void yy();
	/*“abstract public”这个也是默认加的，接口中的方法是抽象方法，都是公开的public*/
	void xx();
	public void jj();
}

//实现接口用implements，必须实现接口中的所有方法（缺一不可，否则就会报错）
class yang implements mminterfance{
	
	public void yy() {	
	}
	public void xx() {	
	}
	public void jj() {
	}
}
