clear() Method : Java.util.ArrayList

   

Declaration :

Explanation :

Purpose Method will remove all of the elements from this list.The list will be empty after call
Parameters NA
Return Value NA
Exception NA

Example

The following example shows the usage of java.util.ArrayList.clear() method.

Output :