Collection Concept

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

Collection Framework- It is a group of object

It is used to sort, filter, manipulate- Insert/Update/Delete

3 Important Interfaces-

1. List- It allows duplication of data


A] Array List- DDL: Select/Get/Read/Fetch/Retrive
B] Linked List- DML: Insert/Update/Delete

2. Set- Uniqueness
A] Hash Set- Does not maintain order
B] Tree Set- Follows order

3. Map- K, V pair In map never allows duplicate key, but it allows duplicate values
A] Hash Map- Does not maintain order
It allows one null key and multiple null values
B] Tree Map- Follows order
No null key and it allows multiple null values

How Hashmap internally works?


1 Bucket-> 16 Block
Hashing Principle | Linked List Structure

1. equals 2. hashcode 3 collision

Diff. Comparable and Comparator

Comparable Comparator
1. .lang .util
2. compareTo() equals(), compare()
3. It is used to single sequence sorting It is used to multiple sequence sorting

You might also like