AP CSA Student Practice
Strings
For the AP Exam, you will need to use the following methods:
- int length()
- String substring(int from, int to)
- String substring(int from)
- int indexOf(String str)
- boolean equals(Object other)
- int compareTo(String other)
- String[] split(String del)
Use the following examples to learn and practice creating String objects and using each of these methods.
NOTE: Instead of System.out we are using IO. IO is not on the AP Exam and it works identically to System.out. On the AP exam, you will continue to see System.out.