Chapter 8. Coding in Java Part 2 – 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, it is plain that there is more to them than has been discussed so far.

In this chapter, we will look at the following topics:

  • The method structure
  • Method overloading versus overriding
  • A method's demo mini app
  • How methods affect our variables

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

Methods revisited

This figure probably roughly sums up where our understanding of methods is at the moment:

Methods revisited

As we can see in the previous ...

Get Android Programming for Beginners 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.