谁来救救孩子吧!

weixin_44936282 2019-04-17 11:44:23
为什么这里会报错,脑袋都想炸了
...全文
68 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
weixin_44936282 2019-04-18
  • 打赏
  • 举报
回复
引用 2 楼 丰云 的回复:
换下面写法试试

public Car(int seats, string brand, string color){
    this.seats   = seats
    this.brand  = brand;
    this.color   = color;
}
谢谢大佬,已经解决了,构造器忘记传父类参数了忘记super调用父类属性了
丰云 2019-04-18
  • 打赏
  • 举报
回复
换下面写法试试

public Car(int seats, string brand, string color){
    this.seats   = seats
    this.brand  = brand;
    this.color   = color;
}
丰云 2019-04-18
  • 打赏
  • 举报
回复
报什么错?

22,210

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server 疑难问题
社区管理员
  • 疑难问题社区
  • 尘觉
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧