Promotion
CodeGym University
Learning
Courses
Tasks
Surveys & Quizzes
Games
Help
Schedule
Community
Users
Forum
Chat
Articles
Success stories
Activity
Reviews
Subscriptions
Light theme
Lessons
Reviews
About us
Start
Start learning
Start learning now
My Progress
Courses
University
Quest Map
Lessons
Java Multithreading
Level 1
You've reached Level 31!
Java Multithreading
Level 1,
Lesson 0
You've reached new Level!
Operator precedence
Java Multithreading
Level 1,
Lesson 1
Bilaabo is happy to greet his friend!
Practice with operator precedence
Java Multithreading
Level 1,
Lesson 2
"Hi, Amigo! I came up with a couple of interesting tasks for you." "They can only be completed in IntelliJ IDEA. Take a look at these interesting conditions…"
All of the Object class's methods, plus more on the toString() method
Java Multithreading
Level 1,
Lesson 3
"Oh, Rishi! Hi!" "Hi, Amigo! How's life?" "Great. Bilaabo has just been telling me a bunch of interesting things about File, and how to work with it." "As it happens, I think I have something to add on this topic." "Really? Then I'm all ears." "Okay, listen up. Java is constantly evolving. Its developers are constantly looking for new ways to do different things more efficiently. In Java 7, they added an alternative to the File class ..."
The equals & hashCode methods: why and where to use them, and how they work
Java Multithreading
Level 1,
Lesson 4
"Now I'll tell you about some methods that are just as helpful: equals(Object o) & hashCode()." "You've probably already remembered that, in Java, when comparing reference variables the objects themselves aren't compared, but rather the references to the objects." "Yes, I remember that." The equals. "The equals method is the standard solution here ..."
Practice with equals and hashCode
Java Multithreading
Level 1,
Lesson 5
"Hi, Amigo!" "Hi, Diego!" "Good old Diego has prepared several tasks for you:"
Introducing the wait, notify, and notifyAll methods
Java Multithreading
Level 1,
Lesson 6
"Hi, Amigo!" "Hi, Rishi!" "I'm going to introduce you to the Object class's wait, notify, and notifyAll methods." "Today we'll just get acquainted with them, but we'll come back later and spend more time on this." "Okay." "These methods were invented as part of the thread synchronization mechanism." "Let me remind you that Java has a built-in mechanism for controlling access to shared resources (objects) from different threads ..."
The clone method and the Cloneable interface
Java Multithreading
Level 1,
Lesson 7
"Hi, Amigo!" "Hi, Kim." "I'm going to tell you about the clone() method." "The point of this method is to clone an object, or in other words, to create a clone/copy/duplicate of the object." "When this method is called, the Java virtual machine creates and returns a duplicate of the object it is called on. The Object class's implementation of the clone method is very primitive: only one new object is created, and the values of the original object's ..."
Practice cloning
Java Multithreading
Level 1,
Lesson 8
"Hi, Amigo!" "I just found a magazine from 2014. Can you imagine?" "And it has a set of cloning tasks that are older than dirt. Check it out:"
The finalize method, closeable interface, and try-with-resources statement (Java 7)
Java Multithreading
Level 1,
Lesson 9
"Hi, Amigo!" "I just decided to discuss the finalize() method with you." "If you remember, finalize() is a special method that is called by an object before the garbage collector destroys it." "This method's main purpose is to free up used external non-Java resources by closing files, I/O streams, and so on." "Unfortunately, this method doesn't live up to our expectations. The Java virtual machine can postpone destroying an object ..."
Practice releasing busy resources
Java Multithreading
Level 1,
Lesson 10
"Hi, Amigo!" "I thought you had already figured out finalize." "That's what I thought. But now we have this try-with-resources statement." "Crap. I'm never going to finish learning Java at this rate. I think I understand everything, and then you show up!" "Don't fret like that—you'll rupture an oil line. Instead, figure out these tasks:"
The getClass() method, the Class object, and an introduction to Reflection
Java Multithreading
Level 1,
Lesson 11
"Hi, Amigo!" "Now it's time for the main event. We'll get acquainted with the Class class and touch on Reflection. As you probably already realized, everything in Java is an object. And what does an object need? What does each object have that defines what it's all about?" "A class!" "Right! Well done. Each object has a class. But getting back to objects... Some objects entirely contain an entity, while others simply help manage it ..."
Show more
1
2
Please enable JavaScript to continue using this application.