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

About Collection Framework

Hi Sir I also want to confirm my understanding of Collection Framework

Collection in java - Represents single unit of objects What I understand is that multiple objects grouped in to one thing ie. Collection

Framework in Java - Provides ready made architecture represents set of classes and interface first point ? What is actually a framework second point - If it is group of classes and interfaces will it be not called Library? on internet they say The java.util package contains all the classes and interfaces for Collection f framework?. So what is framework

Collection Framework - Represents a unified architecture for storing and manipulating group of objects. Interfaces and its implementations i.e. classes Algorithm

So combing above points I think that they created Collection Framework which has many classes and interfaces like List Queue Set Map , All these uses different Algorithms to Set Delete Iterate Sort a Collection ie. Group of Objects and as they have different Algorithms they have different time complexity therefore we sometime uses List<> temp = new ArrayList<> so that we can go to other child's of List and choose better time complexity fucntion so we are not bounded to ArrayList's function n all.

Now when we are using ArrayList (Class) which implement List (Interface) . now if we have to sort the ArrayList we use Comparable interface ie. defined in Collection Framework this Comparable interface has compareTo(Object obj) method which we have to implement in order to sort the objects so it means ArrayList must implement Comparable but if we goto https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html we dont see ArratList in All Known Implementing Classes??

Craig Dennis