Java Programming: Lesson 51 - The Collections Class and Iterators смотреть онлайн
PLEASE SUBSCRIBE!!!
In the previous two lessons (https://youtu.be/LVeZ-kOyB1o and https://youtu.be/uudRXP9WTvc), we learned about LinkedLists, which are better than ArrayLists at inserting and removing elements but worse than ArrayLists at accessing and modifying elements. For either list, we can sort, find the minimum, or find the maximum element using particular static methods from the Collections class, after importing it at the top of the file. Furthermore, an iterator is an object that allows us to parse the elements of an ArrayList or LinkedList. Both the Collections class and iterator will be discussed for at least 5 minutes in the next video.
Collections.sort( list ); //sorts an ArrayList or LinkedLists of objects according to the compareTo( ) method of the class
Collections.min( list ); //returns the minimum element in the ArrayList or LinkedList according to compareTo( )
Collections.max( list ); //returns the maximum element in the ArrayList or LinkedList according to compareTo( )
Use myList.iterator( ) to create an iterator which iterates through an ArrayList or LinkedList called myList
while( listParse.hasNext( ) ) //checks if there's another element to iterate through in the list
{
Q myObject = listParse.next( ); //goes to the next element in the list
//doSomethingWithMyObject
listParse.remove( ); //removes myObject from the list. Optional operation (not always used)
}
0:02 Review of LinkedLists
7:53 NEW: Collections.sort( list )
13:18 NEW: Collections.min(list) and Collections.max(list)
15:37 NEW: Iterators
The Python connection to a topic on iterators is provided in this video: https://youtu.be/q-G72iAWJXo
Ready for another type of data structure? Check out stacks here: https://youtu.be/-LzR3n6bVuk
Thanks for watching, and PLEASE SUBSCRIBE!!!
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Java Programming: Lesson 51 - The Collections Class and Iterators» бесплатно и без регистрации, вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.