>> I still don't understand the "copied = copied && fileSafeCopy(etc)"
assume: fileSafeCopy returns true or false;
prime copied: boolean copied = true;
in a loop:
copied = copied && fileSafeCopy(next file)
which means
new value of copied = old value of coppied && the result of the function
Therefore:
if fileSafeCopy returns true:
newCopied = oldCopied && true
newCopied = true && true
newCopied = true
if fileSafeCopy returns false:
newCopied = oldCopied && false
newCopied = true && false
newCopied = false
The only difference is that we're assigning the result to the same variable
that we're checking. It's very similar to saying: i = i + 1, except instead
of the + operator, we're using the && operator.
x = x && true
x = x && false
i = i + 1
i = i - 1
It's the same idea.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4094806#4094806
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4094806
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user