Help the world stop coronavirus! Stay home!

Prev Next

Java / List and its implementations

How do you remove all the elements from an ArrayList in Java?

using clear() method, we can remove all the elements from an ArrayList in Java.

Another way is passing the same ArrayList reference as an argument to the removeAll() method removes all the elements.

❤Cash Back At Stores you Love !!!❤

Earn your $10 reward when you make your first purchase through Ebates by signing up with clicking below button.

Ebates Coupons and Cash Back

More Related questions...

Show more question and Answers...

Map and its implementations

Comments & Discussions