Steven,
It is on the upgrade exam (from Java 6 or lower), but not the main OCP 8. I wish they didn't cover it at all.
In new code, you'd likely use Files.walk() and a stream with a filter So there isn't a reason to learn Files.walkTree. But it was on the OCP 7 so I guess that's why they put it on the upgrade exam.
Steven Squeers wrote:Thank you Jeanne.
There is so much to learn, in so much depth, that if one can economise safely, it is foolish not to do so, I think.
I agree. Especially on things you are unlikely to use in the real world. I did use Files.walkFileTree a good amount in Java 7. Files.walk is easier to use. (I do a lot of working with Files in my code)