JavaRush
Course
Tasks
Games
Help
Subscriptions
Success stories
Chat
Forum
Articles
Users
Activity

Lessons

  • Reviews
  • About us
Start
Start learning
  • Quest map
  • Lessons
All quests
All levels Level 0 Level 1 Level 2 Level 3 Level 4 Level 5 Level 6 Level 7 Level 8 Level 9 Level 10
  • You've reached Level 16!

    Java Core
    Level 6, Lesson 0
    Congratulations, you've completed the fifth level of the second quest! You've learned a lot about overloading methods, the order of constructor calls, and variable initialization, and you've completed 34 tasks! On the sixth level, you'll plunge into a super important topic: threads.
  • Multithreading

    Java Core
    Level 6, Lesson 1
    Imagine the game "Space Race": you fly, dodging meteorites and patrol cruisers, surrounded by similar starships. The application must track the control commands, move the starships, calculate their trajectories and the consequences of any collision, and draw it all on the screen... How is this done? Answer: multithreading.
  • Creating and starting new threads

    Java Core
    Level 6, Lesson 2
    If you've ever wondered how to start and use a new thread, you'll find out quite soon—in this very lesson. And your teacher Rishi Gatesman will help you with this. But if it's never crossed your mind, Rishi Gatesman will explain it anyway, because now is the time.
  • Practice with threads | Level 6

    Java Core
    Level 6, Lesson 3
    Your teacher Diego has been waiting for you! He can't wait to give you a bunch of tasks on the difficult topic of threads. In this lesson, we'll reinforce our knowledge through practice, and we'll try not to be confused by threads.
  • join — waiting for a thread to end

    Java Core
    Level 6, Lesson 4
    Suppose the main thread has created a child thread to perform some task. Then at some point, the main thread needs the results of work performed by a child thread. But the child thread hasn't finished its work yet. What should the main thread do? This problem is solved by the join method. This lesson will teach you how.
  • Tasks about join

    Java Core
    Level 6, Lesson 5
    Your teacher Diego found out that you learned about the join method in the previous lesson. But he's a suspicious and distrustful robot. He's not one to just take somebody's word (as always!), so he's bombarded you with tasks. Well, what's it to you? It's not the first time. Get cracking!
  • Healthy sleep

    Java Core
    Level 6, Lesson 6
    Even programs need to sleep sometimes. And threads need it even more. To put a thread to sleep, Java has a method called sleep. It's declared as a static method of the Thread class. This means that it isn't associated with any specific object. The purpose of this method is to make the program "fall asleep" for a while. How does this work? You'll learn in the lesson!
  • Practice sleeping

    Java Core
    Level 6, Lesson 7
    Today we'll learn to make time stand still in Java programs. We'll do this using the sleep method, the local time keeper. Your teacher Diego has taken special pains to prepare some tasks for you: you'll play around with a stopwatch, create a countdown, and teach a program to find out what time it is in London.
  • Stopping threads: the unofficial version

    Java Core
    Level 6, Lesson 8
    Let's say the user tells the program to "download a file from the Internet. The main thread creates a separate child thread for this job, and passes it an object whose run method contains all the necessary actions to download the file. And then — wham — the user changes his mind about downloading the file! How do we cancel the job and stop the thread?
  • Stopping threads: the official version

    Java Core
    Level 6, Lesson 9
    This lesson will include many aggressive words like "interrupt". All because we're still studying the possibilities and peculiarities of stopping threads. We'll learn how to use the variable isInterrupt and what the isInterrupted() and interrupt() methods do.
  • Tasks about interrupt

    Java Core
    Level 6, Lesson 10
    If you've always dreamed of writing a game, then you should be very interested in threads and time manipulations. Become a master of threads! To make this happen faster, Diego has prepared five interesting tasks to help you learn about the interrupt() method.
  • Useful links from the Professor — 16

    Java Core
    Level 6, Lesson 11
    Of course, looking at the same material from different angles is useful, because everyone thinks differently, and perhaps for you the best source of the theory will be different from the source best suited to your friend. Especially for you, the Professor found a very interesting lesson online that will teach you a lot more about threads.
  • 1
  • 2
Learn
  • Registration
  • Java Course
  • Help with Tasks
  • Pricing
  • Game Projects
Community
  • Users
  • Articles
  • Forum
  • Chat
  • Success Stories
  • Activity
About
  • About us
  • Contacts
  • Reviews
  • Press Room
  • CodeGym for EDU
  • FAQ
  • Support
Follow us
Interface language
© 2021 CodeGym Programmers Are Made, Not Born
© 2021 CodeGym Programmers Are Made, Not Born