简体   繁体   English

扩展Java类

[英]Extending a Java class

There are two classes 有两节课

public class Account
{
    public Acconut()
    {
       //constructor
    }
}


public class SavingsAccount extends Account
{
}

while doing the inheritance i have got an error message "cannont find symbol Symbol: constructor Account()" what might be the error in my code...?? 在进行继承时,我收到一条错误消息“找不到符号Symbol:构造函数Account()”,这可能是我的代码中的错误...?

A typo in your code: 代码中的错字:

public Acconut()

Instead of 代替

public Account()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM