This week's book giveaways are in the iOS and Features new in Java 8 forums. We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line! See this thread and this one for details.
The thing is like this: I have a method which has int as its return value (the method signature cannot be changed), but in the implementation of this method, I found very hard to define the length of this return value until the end. So I used List to contain return values first and thinking I could extract this list to the int and return. But I didn't find any existing method for doing so, I mean converting Integer List to int. What I did now is write a separate method to interate over Integer list and construct the int to return.
Is there any convenient method there for me to use? Because I feel a little embarrassed to write this conversion like code.