12. class Dog extends Animal

I passed this exercise and the concept is pretty simple, but am wondering,
since the Animal class is in a different file altogether, how does Java know to get this class?
They are in 2 separate files. Can someone explain please in simple terms. Thanks in advance :slight_smile:

<Below this line, add a link to the EXACT exercise that you are stuck at.>

<In what way does your code behave incorrectly? Include ALL error messages.>


Their in the same package. From Wikipedia: “A Java package is a technique for organizing Java classes into namespaces similar to the modules of Modula, providing modular programming in Java. Java packages can be stored in compressed files called JAR files, allowing classes to be downloaded faster as groups rather than individually.”

1 Like

Thanks for the explanation darren. Simple, to the point and easy to understand :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.