-
Interrupting a thread while sleeping results in InterruptedException. So, catch and finally blocks will be executed. "Thread was interrupted!" and "Thread will be finished here!!!" will be printed on screen.
-
There's no thread defined in main method. The code will run in main thread and result is main on screen.
-
First print statement is defined in the task which extends Thread class and will be run in Thread_0. The second print will run in main thread.
This repository was archived by the owner on Jul 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
AminGh05/Multithread-Basics
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- Java 100.0%