Session - 66 (Array vs Collection Framework || Collection Interface vs Map Interface)

Опубликовано: 22 Апрель 2026
на канале: Cubicles Software Testing
289
6

In this video, you can understand:
Array:
1. Similar Type of data
2. We need to specify the size of the Array
3. We can not increase or decrease the size of the array at runtime
4. Memory wastage
5. In the array we don't have any pre-defined method to add, remove, or update elements
6. In an array we can store primitive datatypes, non-primitive(Object)


Collection Framework:
1. Different types of data
2. We do not need to specify the size of the collection
3. We can increase or decrease the size of the collection at runtime
4. No memory wastage
5. Collection provides pre-defined methods to add, remove, and update element
6. In the collection we can store only non-primitive data types


Collection Framework:
Collection framework provides us different Interfaces and Classes by which we
can store different types of data
There are two types of packages
1. Collection Interface
java.util.Collection
Syntax:
public interface Collection extends Iterable
Collection stores data in form of objects

2. Map Interface
java.util.Map
Syntax:
public interface Map
Map stores data in form of objects(Key and Value pair)