This week's book giveaway is in the Other Open Source APIs forum. We're giving away four copies of Storm Applied and have Sean Allen, Peter Pathirana & Matthew Jankowski on-line! See this thread for details.
To see what's happening here, suppose the int 5 is input and assigned to zahl. Then...
newZahl is 5. newZahl is 10. (This just adds newZalh to itself.) result1 is 10. (Supposedly a cumulative sum?) result2 is 1. (Supposedly an average?)
Hint: Try describing exactly what you want to do in English before writing the Java code. For example, "I want to take the input number and add it to a cumulative total." [ April 26, 2006: Message edited by: marc weber ]
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org