Skip Top Navigation Bar

Declaring String Variables and Using String Literals

Overview

In this lesson, students will use reference data by declaring and initializing String objects.

Learning Objectives

Skills

Student Outcomes

Students will be able to:

Duration: 0.5 class period

Resources

Warm-up / Motivate

As students are entering your classroom provide them with a cookie cutter and playdough. Or have a table at the front of the classroom with playdough of different colors and have students use a cookie cutter to stamp out different objects. There will be several cut out shapes. These would be instances or objects created by the cookie cutter blue print which would be considered a class. You can ask students to identify differences between the cut out shapes. They are maybe different thicknesses or colors. These attributes represent the data that defines the objects. You can revisit this activity when deepening the understanding of the relationship between classes and objects.

Learn

Either as a group or on their own, have students review tutorial: Learn: Declaring Strings

Next Lesson

Lesson Plan: Mutable vs. Immutable Data