No problem, thank you so much for sharing your knowledge with us. I had this book on pre-order and I am very excited to have it in my hands now. I'll let you know if I spot anything else as I work through it.
I'm using this old post because I might have found an errata in the same page.
In the #7, the answer is A, but I think that the code doesn't compile due to toRealPath() and File.isSameFile(path1, path2). These methods trow an IOException but it's not handled in any way.
Is this an errata or am I missing something here?
A. Costa wrote:but I think that the code doesn't compile due to toRealPath() and File.isSameFile(path1, path2). These methods trow an IOException but it's not handled in any way.
Is this an errata or am I missing something here?
The book is right as is. That's a code snippet so you get to assume the surrounding method signature is correct.