Join David Gassner for an in-depth discussion in this video Peeking and polling with queues, part of Java Advanced Training.
The LinkedList class is one of the many classes in the Collections framework.…It implements an interface called Queue.…These classes typically are used for first- in-first-out or FIFO sorts of operations.…They all support these methods listed in the grid shown here.…You can Insert, Remove, or Examine objects within a queue.…To Insert, you can call add or offer, to Remove, you can call remove or poll, and to Examine,…you can call element or peek.…
The difference between the methods in the second and third columns is that if one of…the methods in the second column fails it will throw an exception, whereas if you call…a method in the third column, and it fails, it will just return some special value and…won't need exception handling.…I'm going to show you how to peek in an object, and how to poll an object, and show you that…when you peek, you're getting a reference to the object but not removing it from the…queue, but when you poll, you both getting the reference and removing it from the queue at the same time.…
- Installing Java on Windows and Mac OS X
- Installing Eclipse
- Using new features such as simplified generics
- Working with advanced class structures (member, local inner, etc.)
- Using the Reflection API
- Navigating inheritance trees
- Managing unordered and ordered sets
- Peeking and polling with queues
- Testing and error handling
- Managing files and directories
- Working with I/O streams
- Next steps with Java
Skill Level Advanced
1. Getting Started
2. Java 7 New Features
3. Using Advanced Class Structures
4. Using the Reflection API
5. More of the Collections Framework
6. Testing and Advanced Exception Handling
Using the finally keyword5m 40s
7. Managing Files and Directories in Java 7
8. Working with I/O Streams
9. Working with Multi-threading
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.