Recursively reverses a string in java