// String gotcha String s = "apple"; s.replace( 'a', 'b' ); // does nothing s = s.replace( 'a', 'b' ); // replaces all a's with b's String x = " apple "; x.trim(); // does nothing x = x.trim(); // chops blanks off head and tail