This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
In the maybeNew class, there are 2 returns (they are not seperated with a else).
- The example before was clear but i ll explain (just to be sure)
Lets say giveSecret was 5, so the return 42 makes the value 42 now. - Back to the other code. Where do the returns go? -> maybeNew = 0? But why are there 2 returns. Does the compilier make the value first 1 and then 0? Isnt it useless to use 2 returns or just for the example?