2025 SPRING CS 007 Recitation #2 String API & String exercises
The purpose of today's recitation is to show you what Strings are and what they can do. This will prepare you for project coming later this week.
Let's go to the Java API and look at some things that Strings can do.
- length()
- indexOf()
- charAt()
- startsWith()
- endsWith()
- equals()
- toUpperCase(), toLowerCase()
- substring()
Download this starter file Rec2.java and fill in code as suggested by the comments in the file.
The screenshot below shows what your EXACT output MUST BE be based on whatever response you type in at the start of the program.
I will test your program on more than one response and it may or may not be the same ones demonstrated in the execution screenshot.
Here is a text rendering of the execution and EXACT output as the Screen capture
Rec2-Execution.txt