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

Prolog - Listing -

python - can't seem to get an output from my class -

orchardcms - change base url in local copy in Orchard CMS -