Chapter 9: Learning Java Methods

As we are starting to get comfortable with Java programming, in this chapter we will take a closer look at methods because although we know that you can call them to make them execute their code, there is more to them than we have discussed so far.

In this chapter, we will look at the following:

  • Method structure
  • Method overloading versus overriding
  • A method demo mini-app
  • How methods affect our variables
  • Method recursion

First, let's go through a quick method recap.

Technical requirements

You can find the code files present in this chapter on GitHub at https://github.com/PacktPublishing/Android-Programming-for-Beginners-Third-Edition/tree/main/chapter%2009.

Methods revisited

This figure sums up where our understanding ...

Get Android Programming for Beginners - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.