dkber
发贴: 10
积分: 0
|
于 2005-11-17 16:30
这个问题我看了几天了,都没有找出原因。请帮帮我啊。 class Client implements Callback{ public void callback(int p){ System.out.println("callback called with "+p); } void nooIfaceMath(){ System.out.println("classes that implement interfaces: "+ "may also define other members,too."); } } class TestIface{ public static void main(String args[]){ Callback c = new Client(); c.callback(42); } } 怎么执行不了呢?哪里有错?
执行后的显示,我也看不懂: E:\mypack\TestIface2.java:1: cannot resolve symbol symbol : class Callback location: class AnotherClient class AnotherClient implements Callback{ ^ E:\mypack\TestIface2.java:9: cannot resolve symbol symbol : class Callback location: class TestIface2 Callback c = new Client(); ^ E:\mypack\Client.java:1: cannot resolve symbol symbol : class Callback location: class Client class Client implements Callback{ ^ 3 errors
why edited on 2005-11-17 19:13
|