What is ClassLoader?

  • 32
  • Locked
Implement the getAllAnimals method. The method's pathToAnimals parameter is the absolute path to the directory where the compiled classes are saved. The path doesn't necessarily have a "/" at the end. Not all classes inherit the Animal interface.
You can't complete this task, because you're not signed in.
Comments (1)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Justin Smith
Level 38 , Greenfield, USA, United States
15 December 2022, 12:41
Something that had me stuck for a long time on this (I ended up giving up but I figured out the problem later, maybe I'll finish this some day if I need the dark matter)... the pathToAnimals string contains escape sequence character %20 wherever your folder names contain spaces. In order to access the contents of the package, you have to then replace all the "%20" with " " in the pathToAnimals string.