// DrJava saved history v2 int x = 8; int y = 9; x.equals(y) x == y String a = "a"; String b = "a"; a == b a a == a a.equals(b) Player p1 = Player("Brent"); Player p1 = new Player("Brent"); Player p2 = new Player("Brent"); p1.equals(p2) p1 == p2 String x = "This is my string."; x String y = "This is\n my string."; y // \n is the newline character "This is another \t string." // \t is a tab "This is another\ string." "This is another\\ string." "This is another" string." "This is another\" string." x x.substring(4) // returns the String from position 4 onward x.substring(54) x.length() x.substring(4, 8) x x.charAt(3) x.charAt(9) x.charAt(20) x.charAt(2) // charAt returns the character at index 2 "A".compareTo("B) "A".compareTo("B") "A".compareTo("C") x x.indexOf('s') "ant".compareTo("arm") "arm".compareTo("ant") "arm".compareTo("arm") x.indexOf('s') x x.indexOf("my") x.indexOf('a') "Friday".toUpperCase() "Friday".toLowerCase() "FRIDAY".substring(0,2) "FRIDAY".substring(0,3) "FRIDAY".substring(0,3) "FRIDAY".substring(0,3).toLowerCase() "FRIDAY".substring(0,3).toLowerCase() + "DAY" String.valueOf('a') String.valueOf(true) String.valueOf(9) "FRIDAY".substring(3, 5) "FRIDAY".substring(3, 6)