Category: Intro to Java Series

Chapter 17: Class Inheritance (OOP)

Chapter 17: Class Inheritance (OOP)

When used properly, inheritance allows us to extend the properties or methods of a class to its subclasses. It’s like how a child inherits traits from their biological parents. Inheritance allows us to form an “is-a” relationship between different classes, where the child class extends the parent class. This was briefly touched upon back in Chapter 15. […]

Read more
Chapter 16: Java’s Main Method

Chapter 16: Java’s Main Method

In this chapter, we will explore what each keyword in the main method actually means as it relates to object-oriented programming and the scope of the method. By now, you should have seen the main method dozens of times. Main.java Recall that the main method is the entry point to the program. It’s the block of code […]

Read more
Chapter 15: Object Oriented Design – Classes & Constructors

Chapter 15: Object Oriented Design – Classes & Constructors

Welcome to the first chapter on OOP! This is the first of several chapters on this subject. To begin, we will examine basic object-oriented design principles. You will learn what object-oriented design is and its fundamental role in modern application development. By the end of this chapter, you should understand how to create basic objects […]

Read more
Chapter 14: Basic File Input/Output

Chapter 14: Basic File Input/Output

In this chapter, you will learn how to use Java to interact with the computer’s file system. We will use Java to read and save text files on the user’s computer. This will enable you to create programs which can save and load information for later use. Files A file is a piece of information stored on […]

Read more
Chapter 13: Exception Handling – Preventing Errors

Chapter 13: Exception Handling – Preventing Errors

In this chapter, you will learn ways to prevent users from unintentionally crashing your programs. The focus will be on try/catch blocks and using specific scanner methods to read certain data types and prevent exceptions from occurring. 13.1 Exceptions Up to this point in the series, all the programs requiring user input have assumed that […]

Read more
Chapter 12: Advanced String Concepts

Chapter 12: Advanced String Concepts

Strings have been used throughout this series. By now, you should understand that strings hold a series of characters. In this chapter, you will learn more about Strings, how they are structured, how they may be broken down or manipulated, and how to search them. You will also create an algorithm yourself that searches and […]

Read more
Chapter 11: Multidimensional Arrays

Chapter 11: Multidimensional Arrays

This chapter expands on the knowledge discussed about arrays in Chapter 9. You will learn about multidimensional arrays, starting with two-dimensional arrays. The arrays and ArrayLists in the previous two chapters were all one-dimensional arrays. You can think of them like a linear structure of data, where each element in the array comes directly after […]

Read more
Chapter 10: ArrayLists

Chapter 10: ArrayLists

In the last chapter, you learned about arrays. One of the biggest limitations of arrays is their fixed size. A work around was discussed for expanding arrays by creating a new array and copying the old array values into the new. In this chapter, you will learn about ArrayLists. The ArrayList class is used to make dynamic […]

Read more
Chapter 9: Arrays

Chapter 9: Arrays

In this chapter, we’ll be examining arrays. An array is a collection of objects or variables of the same type. Each object or variable in an array is an element of that array. Each element of the array is assigned an index, or a numerical value starting from zero. Elements of arrays are accessed with the array indexing operator, two square […]

Read more
Chapter 8: Recursion

Chapter 8: Recursion

This chapter discusses recursion, or recursive loops. Recursive loops are a loop structure in which a method invokes itself until a certain condition is met. In other words, a method will call itself repeatedly to create a loop. Here is the basic layout of a recursive method. Recursive Counter With Static Variable The first step to create […]

Read more
2
17 guides found