O'Reilly logo

Android Programming for Beginners by John Horton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required