java - How to work with overrided methods -


how can override method superclass in java, how constructor also? , how can call method or constructor of superclass?

to override method in java, need define new method in sub class same name , same types of parameters. before defining should write annotation @override. access method in superclass, should write that:

super.methodname(params..); 

to call super class constructor write:

super(params..); 

Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -