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 don't we create an interface?

Just to make sure I am understanding it properly:

1) In the spark course, we called it "DAO", it is the same concept of "repository" just different name, right?

2) In the Spark course, we said that interfaces are a better solution in case we need to change, but now we are directly coding the class without interface. It is just for demostration? Should we use an interface instead?

3) What is the difference between "@Autowired" and "new ...()"? I think that with @Autowired the instace is created at runtime, is that it? What implications has that in our program? Why would I prefer autowire above the other?

Thank you!!!