If you're looking at the API doc for java.lang.String (
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html)
you'll find the definition for the method trim():
"Returns a copy of the string, with leading and trailing whitespace omitted."
So in your example this means:
" Arg ".trim() will return a new String "Arg" and will be saved
in s1.
" Arg " + args[1] is a new String " Arg Beta" and will be saved in s2.
" Arg Beta".trim will return a new String "Arg Beta" and
will be saved in s2.
Correct output is:
ArgBeta
Arg Beta
Mike