CompareTo
CS1 / Java
Abstract
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 groupActivity Type: Learning Cycle
Discipline: Computer Science
Course: CS1 / Java
Keywords: string methods
Downloads
Published
2023-01-08
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
Issue
Section
CS-POGIL Activity Writing Program
License
Copyright of this work and the permissions granted to users of the PAC are defined in the PAC Activity User License.