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] Next TopicJava Collections Interview Questions |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India