Java For Android Tutorial #19: Inheritance - Super and Override keywords functionalities
What will happen to the child class, if the constructor in the parent class have arguments? The child will have the super keyword with the same arguments inside it's constructor. Super is used to access everything from the parent class (if it is not declared private). Also, override keyword is used to re-write default functionalities of the parent method. You will use '@' before the override keyword. In the next line, you will use define the method.
What will happen to the child class, if the constructor in the parent class have arguments? The child will have the super keyword with the same arguments inside it's constructor. Super is used to access everything from the parent class (if it is not declared private). Also, override keyword is used to re-write default functionalities of the parent method. You will use '@' before the override keyword. In the next line, you will use define the method.