Start learning now
You've leveled up!
Do you remember who teaches the motivational course at the secret CodeGym center? That's right, our super specialist. That being the case, don't be too lazy to read his research about the global job market—its advantages, requirements, career prospects and freedoms—compared with the local market.
Lesson about collections
Java classes whose main purpose is to store a set of other elements are called collections or containers. It makes sense that something we collect is called a collection. Java collections are divided into three main groups: Set, List, Map (or dictionary). This lesson will teach you the difference between them.
List of all collections
Even the very first quest at the secret CodeGym center deals with important matters, so of course the eighth level does. Let's continue getting to know a serious tool: collections and collection interfaces. In this lesson, you will learn that Java has four Lists, three Sets, and four Maps. You'll study a few examples to deepen your understanding.
Practice with collections
Have you ever collected cats? What about plants? Can you guess what HashMap means without any hints? Too many questions! But if you said 'yes' to at least two of the three question, then it's time to create cats and add them to a collection! We'll do tasks involving collections, simultaneously creating a HashSet of plants and a HashMap of cats.
Introducing the Date type
Does time have direction or does it simply exist? The Date type doesn't answer this question. But it helps solve all sorts of interesting problems. For example, measure time intervals, store dates and times, and calculate how many milliseconds have passed since January 1, 1970 GMT.
ArrayList vs. LinkedList
An interface can have multiple implementations. No single implementation is always better than the rest. In one approach, some operations are fast, but others are slow. The opposite can be true for another approach. That's why the List interface has two different classes: ArrayList and LinkedList. This lesson explores how one is better than the other and vice versa.
Measuring list performance
The topic of "collections" can fry your brain, but we'll try to train your brain to make the smoke point as high as possible... So let's work on some tasks, preferably interesting ones. Let's take some measurements right in this lesson: We'll find out how long it takes to perform 10,000 insertions on each of the lists, and how long it takes to call get the same number of times.
What do we do with Set and Map?
A Set is a bunch of unnumbered objects. A Map is a set of key-value pairs. Though they are similar, but there are some things you can do with Map that you can't do with Set. In the latter case, we just add elements, delete them, and check if they are in the set. But a Map supports many more operations. Wanna know what these operations are? Let's complete this lesson.
Practice using Set and Map
Though not as popular as ubiquitous lists, Map (a set of key-value pairs) is used in many tasks. In this hands-on lesson, you'll learn how to work with Map and Set in the standard CodeGym way. Have you guessed the way*? (*answer: by completing tasks).
Useful links from the Professor – 8
We must respect the work of our aged professor: he keeps toiling, looking for the references that students need and willingly sharing them. All for the sake of knowledge! Today he's unearthed excellent articles on ArrayList, LinkedList and collections in general. You can't skip this. You must do the reading! Let's do the lessons and load up knowledge!
Without Java, we would have a Javapocalypse
You’ve almost completed Level 8! With all these lectures and tasks, you need a break. Learning Java may be tough, but remember: the world can’t exist without Java! What if it suddenly disappeared one day? What would happen to our familiar surroundings? Make yourself comfortable and watch an exciting and fun video about the real Javapocalypse. :)
Several tasks must be completed at the end of the level. Some of them are more advanced and require student's to be able to google. Or think. Or think and google. Practice completing them day in and day out, and your skills will grow at an incredible speed. They were created especially for IDEA.