CIS 160 Strings and parsing

Objectives:

parsing and wrapper classes

Strings

Common Java String methods

MethodPurpose
s1.equals(s2)returns true or false
s1.equalsIgnoreCase(s2)returns true or false
s1.compareTo(s2)returns an integer less than 0 if s1 is less than s2, greater than 0 if s1 is greater than s2, and equal to 0 if s1 is the same as s2
s1.compareToIgnoreCase(s2)returns an integer less than 0 if s1 is less than s2, greater than 0 if s1 is greater than s2, and equal to 0 if s1 is the same as s2
s1.toUpperCase()returns the upper case version of string s1
s1.toLowerCase()returns the lower case version of string s1
s1.length()returns the length of string s1

External resource