Javatpoint Logo
Javatpoint Logo

How to reverse ArrayList in Java?

The reverse method of Collections class can be used to reverse any collection. It is a static method. Let's see the signature of reverse method:

Let's see a simple example to reverse ArrayList in Java:

Output:

Before Reversing
[Mango, Banana, Mango, Apple]
After Reversing
[Apple, Mango, Banana, Mango]






Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA