CS1 / Java
In this activity students will experiment with different print statements using compareTo with two strings. Students will predict the output when comparing Strings that are one character long. They will then check the output in the IDE. Next the students will see the difference when the Strings are longer than one character and they experiment with longer Strings.
This activity was developed with NSF support through IUSE-1626765. You may request access to this activity via the following link: IntroCS-POGIL Activity Writing Program.Level: High School or Undergraduate Setting: Classroom with computers for each group
Activity Type: Learning Cycle
Discipline: Computer Science
Course: CS1 / Java
Keywords: string methods
How to Cite
Sebek, N. (2023). CompareTo: CS1 / Java. POGIL Activity Clearinghouse, 3(4). Retrieved from https://pac.pogil.org/index.php/pac/article/view/299
CS-POGIL Activity Writing Program
Copyright of this work and the permissions granted to users of the PAC are defined in the PAC Activity User License.