This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Step through the code. 1. You are getting the value of the first argument passed on the command line and passing it into an Integer object. 2. You take that value and return it as an int with intObj.intValue(). So i = 2. 3. You check to see if the length of args is greater than 1, which it is not since there is only one value ("2") passed in so length = 1. 4. You check to see if the length of args is greater than 0 which it is since a value was passed in, so you take i-1 which is 1 Bill