Pergunta de entrevista da empresa SAP Ariba

Trim a string in Java (remove leading and trailing white space). You can't use the String.trim() function. Do it just using an array. Keep in mind the string could have white spaces within it.

Resposta da entrevista

Sigiloso

22 de nov. de 2012

tokenize the string with space and then join all the array values.