Title: Methods add and remove - Generics and Collections - Sun Certified Java Programmer 310-065 - Lesson 36
Duration: 16 minutes
Summary: In this video, we will start with a PriorityQueue. We tackle an example that contains the methods add, remove, poll, offer, and peek. Using Notepad, we step through the code and wrote down the contents of the queue as we are adding and removing elements from it. Try to use this approach in the exam, so you can know the content of the queue at any point in time. You also need to know the difference between the methods listed above. Then, we look at an example that showed the difference between using a HashSet versus a TreeSet. We finally discussed a question that implemented the equals method, but then asked the difference between having the hashCode() method being implemented and not implemented.
Methodology of the development of example: Good coding standard and simplified design to prepare for the Java programmer certification exam CX-310-065.
Technology Used: Java - Core Concepts.
Keywords: Class, Object, PriorityQueue, peek(), poll(), offer(), Set, HashSet, TreeSet(), equals().












Post stats:
See the prices for this post in Mr.Bool Credits System below: