<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-can-you-reverse-the-elements-of-a-list---cracking-the-java-coding-interview-javacoding-qxjqi9swa" -->

---
title: How can you reverse the elements of a List? - Cracking...
description: Reversing a list in Java involves two options: Collections.reversed(), a factory method that requires a modifiable list with a set-capable list iterator (works...
canonical: https://daily.dev/posts/how-can-you-reverse-the-elements-of-a-list---cracking-the-java-coding-interview-javacoding-qxjqi9swa
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How can you reverse the elements of a List? - Cracking the Java Coding Interview #javacoding | daily.dev
og:description: Reversing a list in Java involves two options: Collections.reversed(), a factory method that requires a modifiable list with a set-capable list iterator (works...
og:url: https://daily.dev/posts/how-can-you-reverse-the-elements-of-a-list---cracking-the-java-coding-interview-javacoding-qxjqi9swa
og:image: https://api.daily.dev/og/posts/qxjQi9sWa.png
og:image:alt: How can you reverse the elements of a List? - Cracking the Java Coding Interview #javacoding
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How can you reverse the elements of a List? - Cracking the Java Coding Interview #javacoding

**[Java \(Official Oracle\)](https://daily.dev/sources/java-oracle)** · 1 min read · 0 upvotes · 0 comments

## Summary

Reversing a list in Java involves two options: Collections.reversed(), a factory method that requires a modifiable list with a set-capable list iterator (works with ArrayList, LinkedList, and Arrays.asList), and it actually mutates the list; and the reversed() method from the SequencedCollection interface (extended by List), which returns a lazy, non-mutating view of the original list that works even on unmodifiable lists. The view is modifiable if the backing list is, and changes to it propagate back. Collections.reversed() is costlier since it processes the whole list, whereas the view-based reversed() is lightweight since it wraps and operates lazily.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=zlEC4rVx6uA>

## Questions this post answers

### What is the difference between Collections.reversed() and the List.reversed() method in Java?

Collections.reversed() is a factory method that requires a modifiable list with a list iterator supporting set, and it physically reverses the list by processing every element, which can be costly. List.reversed(), added via the SequencedCollection interface that List extends, returns a lightweight, lazy view of the list without modifying the original, and it also works on unmodifiable lists.

_Developers weighing list-reversal tradeoffs in Java can find these interview-style breakdowns on daily.dev._

### Does calling reversed() on a Java List modify the original list?

No, the reversed() method from SequencedCollection returns a view, not a modified copy, so the original list stays untouched unless you explicitly modify the view. If the original list is modifiable, the returned view is also modifiable, and changes made through the view propagate back to the original list.

_Anyone debugging unexpected list mutations in Java can browse similar gotchas on daily.dev._

### Which Java list implementations support Collections.reversed()?

ArrayList, LinkedList, and the list returned by Arrays.asList all support Collections.reversed() because their list iterators implement the required set operation. Custom or other list implementations may not support this, so it needs to be verified before relying on the method in an application.

_Java developers vetting collection implementations for edge cases can track such gotchas on daily.dev._

## Similar posts on daily.dev

- [Java List Series](https://daily.dev/posts/java-list-series-3ol6zzuck) · Baeldung · 3 upvotes · 0 comments

---

Tags: [#java](https://daily.dev/tags/java)

[View this post on daily.dev](https://daily.dev/posts/how-can-you-reverse-the-elements-of-a-list---cracking-the-java-coding-interview-javacoding-qxjqi9swa)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How can you reverse the elements of a List? - Cracking the Java Coding Interview #javacoding","url":"https://daily.dev/posts/how-can-you-reverse-the-elements-of-a-list---cracking-the-java-coding-interview-javacoding-qxjqi9swa","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-can-you-reverse-the-elements-of-a-list---cracking-the-java-coding-interview-javacoding-qxjqi9swa"},"datePublished":"2026-09-02T10:21:11.944Z","dateModified":"2026-09-02T10:21:31.119Z","description":"Reversing a list in Java involves two options: Collections.reversed(), a factory method that requires a modifiable list with a set-capable list iterator (works...","image":"https://i.ytimg.com/vi/zlEC4rVx6uA/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/zlEC4rVx6uA/sddefault.jpg","isAccessibleForFree":true,"articleSection":"Java (Official Oracle)","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Java (Official Oracle)","logo":"https://media.daily.dev/image/upload/s--SM9hIYUY--/f_auto,q_auto/v1773648791/logos/java-oracle?_a=BAMAMiiu0","url":"https://daily.dev/sources/java-oracle"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/how-can-you-reverse-the-elements-of-a-list---cracking-the-java-coding-interview-javacoding-qxjqi9swa","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"java","timeRequired":"PT1M","video":{"@type":"VideoObject","name":"How can you reverse the elements of a List? - Cracking the Java Coding Interview #javacoding","description":"Reversing a list in Java involves two options: Collections.reversed(), a factory method that requires a modifiable list with a set-capable list iterator (works...","thumbnailUrl":"https://i.ytimg.com/vi/zlEC4rVx6uA/sddefault.jpg","uploadDate":"2026-09-02T10:21:11.944Z","duration":"PT1M","url":"https://api.daily.dev/r/qxjQi9sWa","embedUrl":"https://www.youtube.com/embed/zlEC4rVx6uA"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Java (Official Oracle)","item":"https://daily.dev/sources/java-oracle"},{"@type":"ListItem","position":3,"name":"How can you reverse the elements of a List? - Cracking the Java Coding Interview #javacoding"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/how-can-you-reverse-the-elements-of-a-list---cracking-the-java-coding-interview-javacoding-qxjqi9swa#faq","mainEntity":[{"@type":"Question","name":"What is the difference between Collections.reversed() and the List.reversed() method in Java?","acceptedAnswer":{"@type":"Answer","text":"Collections.reversed() is a factory method that requires a modifiable list with a list iterator supporting set, and it physically reverses the list by processing every element, which can be costly. List.reversed(), added via the SequencedCollection interface that List extends, returns a lightweight, lazy view of the list without modifying the original, and it also works on unmodifiable lists. Developers weighing list-reversal tradeoffs in Java can find these interview-style breakdowns on daily.dev."}},{"@type":"Question","name":"Does calling reversed() on a Java List modify the original list?","acceptedAnswer":{"@type":"Answer","text":"No, the reversed() method from SequencedCollection returns a view, not a modified copy, so the original list stays untouched unless you explicitly modify the view. If the original list is modifiable, the returned view is also modifiable, and changes made through the view propagate back to the original list. Anyone debugging unexpected list mutations in Java can browse similar gotchas on daily.dev."}},{"@type":"Question","name":"Which Java list implementations support Collections.reversed()?","acceptedAnswer":{"@type":"Answer","text":"ArrayList, LinkedList, and the list returned by Arrays.asList all support Collections.reversed() because their list iterators implement the required set operation. Custom or other list implementations may not support this, so it needs to be verified before relying on the method in an application. Java developers vetting collection implementations for edge cases can track such gotchas on daily.dev."}}]}
```

