Java: Queue - LinkedList (FIFO: First In First Out)

Опубликовано: 13 Январь 2024
на канале: HowTo:
157
5

The Queue interface is present in java.util package and extends the Collection interface is used to hold the elements about to be processed in FIFO(First In First Out) order. It is an ordered list of objects with its use limited to inserting elements at the end of the list and deleting elements from the start of the list, (i.e.), it follows the FIFO or the First-In-First-Out principle.

Being an interface the queue needs a concrete class for the declaration and the most common classes are the PriorityQueue and LinkedList in Java. Here you can see LinkedList class example.

00:05 - info
00:24 - initializes queue
00:36 - .add(e)
01:03 - .remove()
01:56 - .peek()
02:28 - .size()

#howto #java #easyway #firststep #stack #lifo #fifo

Music track: Too Hot by Aylex
Source: https://freetouse.com/music
Free Background Music for Video


На этой странице сайта вы можете посмотреть видео онлайн Java: Queue - LinkedList (FIFO: First In First Out) длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь HowTo: 13 Январь 2024, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 157 раз и оно понравилось 5 зрителям. Приятного просмотра!