Java List Collection Tutorial and Examples
The following example demonstrates the Clear method and various other properties and methods of the List
Sep 29, 2015
Java arraylist clear method - w3resource
Now when the Java process is connected to a console, i.e. has been started from a command line without output redirection, it will clear the console. answered Aug 27, 2018 by Sushmita • 6,890 points
The clear() method of List interface in Java is used to remove all of the elements from the List container. This method does not deleted the List container, instead it justs removes all of the elements from the List. Syntax: public void clear() Parameter: This method accepts does not accepts any parameter. Return Value: The return type of the function is void and it does not returns anything. ArrayList clear() in Java with examples - GeeksforGeeks Mar 19, 2018