Quantcast
Channel: CSDN博客推荐文章
Viewing all articles
Browse latest Browse all 35570

Java-接口的多继承

$
0
0

interface A
{
 public void print1();
}
interface B extends A
{
 public void print2();
}
interface C extends B
{
 public void print3();
}
class X implements C
{
 public void print1()
 {
  System.out.print("Aaron"+"\t");
 }
 public void print2()
 {
  System.out.print("love"+"\t");
 }
 public void print3()
 {
  System.out.print("Crystal");
 }
}
public class test36 {
 public static void main(String args[])
 {
  X x=new X();
  x.print1();
  x.print2();
  x.print3();
 }

}

作者:xuejiawei123 发表于2013-7-16 11:12:10 原文链接
阅读:35 评论:0 查看评论

Viewing all articles
Browse latest Browse all 35570

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>