Size of ArrayList

Its very important to know the size of ArrayList as it is required in most of the times while coding We have size() method in ArrayList class which helps us to determine the size of ArrayList Size is the number of elements in that ArrayList public int size() public int size() Example : import java.util.*; […]

Share this article on

Sublist from ArrayList

In this article, we will understand how to get sublist from the existing ArrayList. We just need to specify the from_Index and to_Index to specify the range of sublist using a method defined in ArrayList as below List subList(int fromIndex, int toIndex) List subList(int fromIndex, int toIndex) Note : fromIndex is inclusive and toIndex is […]

Share this article on
< Previous Next >