Usuń przestrzenie na początku i na końcu Java sznurka

String withSpaces = "  Hi  ";
String withoutSpaces = withSpaces.trim();
Determined Dingo