标题:求助 怎么还错啊??
取消只看楼主
hym_19820718
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2005-12-21
 问题点数:0 回复次数:1 
求助 怎么还错啊??

public interface InterfaceExample{
final int X;
void a();
void b();
}
class example implements public interface InterfaceExample{
final int X;
void a();
void b();
}
class example implements InterfaceExample{
void a(){
System.out.println("i lou");
}
}
public class Main {

public static void main(String[] args) {
Example example = new Example();
example.a();
}
}
{
void a(){
System.out.println("i love china");
}
}
public class Main {

public static void main(String[] args) {
Example example = new Example();
example.a();
}
}
错在哪里了 ?InterfaceExample这个接口有错误吗?

2006-01-12 23:23
hym_19820718
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2005-12-21
得分:0 

public interface InterfaceExample{
final int X;
void a();
void b();
}
class example implements InterfaceExample{
void a(){
System.out.println("i lou");
}
}
public class Main {

public static void main(String[] args) {
Example example = new Example();
example.a();
}
}
不好意思 粘多了! 错在哪里了??

2006-01-12 23:25



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-42715-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.345977 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved