interface Computer
{
int Max = 100;
void speak(String s);
int f(int x);
//float g(float x, float y);
}
abstract class A implements Computer
{
}
class B extends A
{
public void f(int x);
{
}
public void speak(String s)
{
System.out.println(s);
}
}
public class Demo3
{
public static void main(String []args)
{
B b = new B();
}
}编译出错。。
求原因。
{
public int f(int x) {
return 0;
} public void speak(String s)
{
System.out.println(s);
}
}
public class Demo3
{
public static void main(String []args)
{
B b = new B();
}
}