Веб-версияОткрыть в Telegram

Пост18 Most common used Java List methods

29 июня 2026
J
Java Programming
GIF
ssstwitter.com_1704397323843.mp4 · 579 КБ · нажмите — покажем
18 Most common used Java List methods 1. add(E element) - Adds the specified element to the end of the list. 2. addAll(Collection<? extends E> c) - Adds all elements of the specified collection to the end of the list. 3. remove(Object o) - Removes the first occurrence of the specified element from the list. 4. remove(int index) - Removes the element at the specified position in the list. 5. get(int index) - Returns the element at the specified position in the list. 6. set(int index, E element) - Replaces the element at the specified position in the list with the specified element. 7. indexOf(Object o) - Returns the index of the first occurrence of the specified element in the list. 8. contains(Object o) - Returns true if the list contains the specified element. 9. size() - Returns the number of elements in the list. 10. isEmpty() - Returns true if the list contains no elements. 11. clear() - Removes all elements from the list. 12. toArray() - Returns an array containing all the elements in the list. 13. subList(int fromIndex, int toIndex) - Returns a view of the portion of the list between the specified fromIndex, inclusive, and toIndex, exclusive. 14. addAll(int index, Collection<? extends E> c) - Inserts all elements of the specified collection into the list, starting at the specified position. 15. iterator() - Returns an iterator over the elements in the list. 16. sort(Comparator<? super E> c) - Sorts the elements of the list according to the specified comparator. 17. replaceAll(UnaryOperator<E> operator) - Replaces each element of the list with the result of applying the given operator. 18. forEach(Consumer<? super E> action) - Performs the given action for each element of the list until all elements have been processed or the action throws an exception.
12 · 5.1K ·

Рядом в ленте

JJava Programming🚀 Data Structures & Algorithms (DSA) 👨‍💻🔥 Once you understand programming basics and core concepts, the next step is DSA: This is where you become a strong probJJava Programming🔹 Why Big-O Matters Two programs may give the same output… …but one may take: ✔ 1 second ✔ another may take 1 hour 😵 Big-O helps measure performance. 📊 Common C
это сообщение
JJava Programming😱 6 Coding websites that feel illegal to know 👇 1/ overapi.com: Collection of all programming languages cheat sheets https://overapi.com/ 2/ Roadmap.sh: ProvideJJava Programming🔤 A–Z of Web Development 🌐 A – API Set of rules allowing different apps to communicate, like fetching data from servers. B – Bootstrap Popular CSS framework for
JJava ProgrammingJava Programming@Java_Programming_Notes · канал · Технологии
33 198подписчиков1 533средний охват поста
Лента площадки Открыть в Telegram

Открытая публичная лента из поискового индекса ChatCrawler — «Google по публичному Telegram»; обновляется по мере обхода площадки. Время — UTC.

Только публичный контент, официальный API Telegram. О проекте · Вопросы · Чего мы не делаем · Убрать страницу из выдачи · Каталог · Поиск · Как мы считаем