Skip to Content
The Java Workshop
book

The Java Workshop

by David Cuartielles, Pradeep Kumar Gupta, Scott Cosentino, Andreas Göransson, Eric Foster-Johnson, Avinash Kate
October 2019
Beginner
606 pages
10h 37m
English
Packt Publishing
Content preview from The Java Workshop

3. Object-Oriented Programming

Overview

In this chapter, we will consider the way in which Java implements object-oriented programming (OOP) concepts. For these purposes, you will first practice creating and instantiating your own classes so that you can later create methods that can handle data within them. We will then take you through how to code recursive methods, and even how to override existing methods in favor of your own. By the end of the chapter, you will be fully equipped to overload the definition of methods in order to accommodate different scenarios with different parameters to the same method or constructor, and annotate code to inform the compiler about specific actions that must be taken.

Introduction

A Java class is ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Modern Java Collections

Modern Java Collections

Simon Roberts
Java By Comparison

Java By Comparison

Simon Harrer, Linus Dietz, Jörg Lenhard

Publisher Resources

ISBN: 9781838986698Supplemental Content