Some java code that reverses a given string