Make sure you know which methods belong to String, e.g., concat() and which to StringBuffer, e.g., append(). Remember that the substring(int beginIndex, int endIndex) uses a zero-based beginIndex but starts with 1 for the endIndex - (and has en evil lower-case 's' in substring).
But most of all, understand the difference between Strings - immutable objects - and StringBuffers - not-so-immutable objects.
String s = new String ("Java");
StringBuffer sb = new StringBuffer("Java");
The line of code
created a new String "Java Rules!", but didn't attach a reference to it!