public class Puzzler { public static void main(String[] args) { //s = "caterpillar" //print a string containing the first and last letters of s //print(s[0] + s[-1]) //print the substring between teh first and last 'a' in s. //start = s.find("a") + 1 //end = s.rfind("a") //print(s[start:end]) //print s in upper-case //print(s.upper()) //print True if "cat" is a substring of s. //print("cat" in s) //print False if "iar" is not a substring of s. //print("iar" in s) //t = "CaTerPIllAR" //print True if s and t are the same string, case INsensitive //do this TWO different ways. //print(s.upper() == t.upper()) //print 50 stars //print("*"*50) //print u with all whitespace removed from the right. //u = " paddded " //print(u.rstrip()) //print u with all whitespace removed from the right. //print(u.lstrip()) //print u with all whitespace removed both sides. //print(u.strip()) //replace every a in s with an A and print. //print(s.replace("a", "A")) //replace "cat" in s with "dog" //print(s.replace("cat", "dog")) } }