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.
I swear it's not homework or something. I just thought it would be interesting to see what you guys come up with!
Just found this example on the web. While I believe you that it is not your homework assignment -- it is clearly an assignment for some java class. I don't think the teacher would appeciate us putting possible answers for the assignment on the web.