开发者

Extending a Java class

开发者 https://www.devze.com 2023-01-01 03:59 出处:网络
There are two classes public class Account { public Acconut() { //constructor 开发者_运维技巧 } } public class SavingsAccount extends Account

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...??


A typo in your code:

public Acconut()

Instead of

public Account()
0

精彩评论

暂无评论...
验证码 换一张
取 消