#Java Data Structure #Generic Array List

preview_player
Показать описание
Java Data Structure Series: Generic Array based Dynamic List with That Grow & Shrink based on number of elements.

Java introduces generics since Java SE 5.0.
We can specify a type parameter to be used for dynamic data types.
With Generics we can utilize same class with different datatypes (Built-in Wrapper classes such as String, Integer or Custom User defined classes).
Syntax: DynamicArrayList<Integer> or DynamicArrayList<Double>

Lists are very basic data structures.
DynamicGenericArrayList is a dynamic data structure.
DynamicGenericArrayList provides Random Access to its elements.

Default Constructor
Parameter Constructor with Size Parameter
addElement – add new element into the List
RemoveElement – remove an existing element
AddFront – Add an element to the front of the List
RemoveFirst – Remove element from front of the List
RemoveLast – Remove element from the end of the list.
Size – Get the size of list i.e number of elements.
isEmpty – Check if the List is empty
isFull – Check if the list is Full.
toString – Get the String representation of List.
getElement – Get element by Index
Search – Search element if it exists return true.
Grow – Increase the capacity of the underlying array.
Reduce – Decrease the capacity of the underlying array.
Рекомендации по теме
Комментарии
Автор

Please SUBSCRIBE to my channel to promote and encourage. Thanks.

CodingHelpLine