Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java

Why Class Animal didn't need a constructor unlike Class Dog?

In the video, Ben creates a Class Animal and then goes on to create a Class Dog which extends Class Animal. In the main(), a new Dog object was created and in the Class Dog, a constructor was needed to be declared. But, why was there no need to declare a constructor for Class Animal? I thought that as we hadn't created a Class Animal object, we hence didn't need a constructor. But I checked on IDEA and even though I created a new Animal object, I was never prompted to create a constructor or given any errors.