我在我的程序中使用了实现继承,并且我的子类中的方法没有在main方法中被调用。它显示错误"The method getArea() is not defined in type Second“。程序应该创建一个具有这些边的Triangle对象,并使用输入设置颜色和填充属性。程序应显示面积、周长、颜色和true或false,以指示是否填充。
我刚开始学习Java,有人能解释一下以下代码的执行流程吗?我对输出结果很困惑。public class MainClass { car c = new car(); /* I am unable to understand what's happening while printing the values using the objects of the different classes*/