...and people are still using java?
Last week I was at the LASER 2009 summer school on Software Testing. It was pretty interesting and one brief talk captured my attention. The speaker, Martin Nordio, asked the audience if they knew Eiffel and only a few hands were raised. So he asked if they knew Java instead. Everyone raised his hand. To show to the audience they were wrong in assuming they knew about Java, he showed 6 samples of source code written in Java and asked the audience what the program did and bet that no one would have the right 6 answers.
Let's do the same here. I'm going to give you the exercises and will post the answers in my next blog entry.
1. What is the value of b at the end of this code:
2. What is the value of b at the end of this code:
3. What is the value of b at the end of this code and tell us if this executes normally or with an exception:
4. What is the value of b at the end of this code and tell us if this executes normally or with an exception:
5. The previous sample was too long, what does this return:
6. If you have answered properly to the above questions, then you are definitely quite an expert. To prove it, tell us the value of b at the end of the call as well as the return value:
PS: Feel free to post your answers as comments to this blog entry.