Please enable JavaScript to use CodeHS

AP Computer Science A (Nitro)

Lesson 2.7 String Objects

Description

In this lesson, students will learn about the immutability of Strings as objects. Once a String object is created, it cannot be changed or manipulated. The only way to change a String value is to reassign the variable with a different String value. Students will also practice String concatenation using operators such as + and += and use escape sequences such as \” and \n. This lesson corresponds with AP Computer Science A topic 2.6.


Objective

Students will be able to:

  • Create String objects for a String class
  • Concatenate Strings using operators and escape sequences