JZTXT
  • 首页
  • Ai
  • Java
  • Python
  • Android
  • Mysql
  • JavaScript
  • Html
  • CSS

super以及this

发布时间 2023-11-27 10:20:18作者: 同学?

super注意点
super调用父类的构造方法,必须在构造方法的第一个
super和thi不能同时调用构造方法
与this的区别
代表的对象不同:
this:本身调用者这个对象
super:代表父类对象的引用
前提:
this:没有继承也可以使用
super:只能在继承条件下才可以使用
构造方法:
this();本类的构造
super();父类的构造

 

    本栏目推荐文章
  • 2024-01-13 Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. ==》引用了未使用的方法导致
  • [Vue warn]: Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".
  • vue报错:Module parse failed: Unexpected token (5:2) You may need an appropriate loader to handle this file type.
  • About this page
  • JavaScript this 绑定详解
  • JavaScript this 绑定详解
  • react 事件函数中 this 绑定问题
  • mysql--You must reset your password using ALTER USER statement before executing this statement
  • keil 工程编译报错browse infomation of one or more files is not available: ……Doing a project rebuild might fix this.
  • 修改账户密码时提示 ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement 错误
版权声明:本网站为非赢利性站点,本网站所有内容均来源于互联网相关站点自动搜索采集信息,相关链接已经注明来源。
联系我们