• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

sybex - chapter 9 question 17

 
author & internet detective
Posts: 39433
768
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got this question by email. Posting here since I prefer to answer book questions in the forum.

On Page 489, the example says that the Files.walk() method looks at the input parameter's subdirectories and prints files there too.

But on Question 17, I was told the answer was G instead of EFG. Why is this? What about the test question makes it different from the example?


E is "It prints all .java files in the /animals directory tree"
F is "It prints all .java files in the /animals/cute directory tree"
G is "It prints all .java files in the root directory tree"

E and F are more specific than G. So yes, you could argue that they are true. It's an interpretation of English thing. We took it as "only prints". I'll make a note for the Java 11 book so we clarify this.
 
Jeanne Boyarsky
author & internet detective
Posts: 39433
768
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, don't worry about this on the real exam. The real exam tells you how many answers are correct. If you got this question and it said "choose 2" you'd know right away!
 
No prison can hold Chairface Chippendale. And on a totally different topic ... my stuff:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!