Explain @override method?
Post a Reply
|Oldest Newest Rating|
· October 10, 2015
Classes and interfaces can contain methods. Sometimes you don't want to use the method the way it is written and then you override the method.
When you implement an interface, you are agreeing to a "contract" that says you must implement the methods in the interface. Very often these methods are just a template. Then you override them in your code and give them your own functionality
The Blank activity assumes you want to use the menu capability of the Action Bar.
Therefore it creates the mandatory methods that you need to override.
However, the purpose of the tutorial is to teach a concept that does not require the menus, so you are instructed to delete the overrides since the detract from the concept being presented.
Jump to tutorial # 33 if you want to see the menu overrides implemented.
· October 12, 2015
Thank you Gary Whitney!
Java / Android Development
Very popular language used to create desktop applications, website applets, and Android apps.
|Bucky Roberts Administrator|