CompareTo

CS1 / Java

Authors

  • Nicole Sebek University Preparatory Academy

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 group
Activity 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