image
Course Wrap Up

Contents

Strings and the StingBuilder Class
1
Course Overview
PREVIEW1m 4s
2
String Methods Part 1
PREVIEW12m 55s
3

The course is part of this learning path

Start course
Difficulty
Intermediate
Duration
47m
Students
140
Ratings
5/5
starstarstarstarstar
Description

This course delves into the String class and looks at the functionality it provides through a host of methods. We will also discuss how string objects are immutable, which means the object itself can't be modified once they've been created.

Learning Objectives

  • Learn how the StringBuilder class differs from the string class

Intended Audience

  • Beginner coders or anyone new to Java
  • Experienced Java programmers who want to maintain their Java knowledge
  • Developers looking to upskill for a project or career change
  • College students and anyone else studying Java

Prerequisites

This is a beginner-level course and can be taken by anyone with an interest in learning about Java.

Transcript

In this section, we've learned about how to work more effectively with text data primarily using the string class. We discussed some of the incredibly useful methods that the string class offers, including the equals and compare two methods for comparing strings, and how they differ from usage of the double equal sign or equal to operator, which compares the addresses when applied to reference types like string. Further, we discussed the length and charAt methods obtaining useful information about the string object we're working with.

Later, we discussed the toUpperCase and toLowerCase methods for obtaining upper and lowercase versions of a string, as well as the substring method for obtaining portions of a string and the indexOf method for finding the index of a particular character or substring within a string. After our discussion of the string class, we took a look at the StringBuilder class. We saw how the string class is immutable and that the StringBuilder is mutable.

Mutability refers to the capability of modifying or mutating, which is where the word mutable comes from, the contents of an object. In the case of the string class, you cannot modify the object once it is created. StringBuilder on the other hand allows you to modify the textual data that you are working with. We finished off the section with a project that split strings, store them in ArrayLists, and printed permutations of the first and last names. In the next section, we will discuss methods. I'll see you there.

 

About the Author
Students
1352
Courses
20
Learning Paths
4

John has a Ph.D. in Computer Science and is a professional software engineer and consultant, as well as a computer science university professor and department chair.

Covered Topics