}
}
public class Son extends math
{
public float add()
{
return 6.32f + 1536f;
}
public static viod main(String args[])
{
math m = new Son();
System.out.println(m.add());
}
}
编译总是不能通过。这是为什么?
[code]class math
{
public float add()
{
return 10 + 15;
}
}
public class Son extends math
{
public float add()
{
return 6.32f + 1536f;
}
public static void main(String args[])
{
math m = new Son();
System.out.println(m.add());
}
}[/code]