Back Java Concurrency & Multithreading Complete Course in 2 Hours | Zero to Hero | Interview Questions

90-120
Created By: Riddhi Dutta
Published At: 2023-03-05
Search Query: Java Get Started,Java Threads
Tags: java multithreading tutorial java multithreading interview questions java multithreading project java multiple inheritance java multithreading by durga sir java multithreading and concurrency tutorial java multithreading synchronization java multithreading complete tutorial java multithreading interview questions for 10 years experience java multithreading program java concurrency tutorial java concurrency and multithreading interview questions
In this video , I have covered all the important concepts related to Multithreading and Concurrency in Java , covering some of the very important interview questions like synchronization , volatile keyword , producer consumer pattern , deadlocks etc.

00:00:00 - What to expect in the Course?
00:02:26 - Multitasking
00:06:00 - Difference between Thread and a Process
00:10:28 - Threads in Java
00:12:50 -The Main Thread
00:15:33 - Thread Creation in Java
16:31 - Extending Thread Class to create a Thread
24:30 - Implementing Runnable
28:30 - Deep Diving into the Thread Class
00:39:19 - Synchronization in Java
40:26 - Race Condition and Introduction to Concurrency
41:39 - Synchronization Demo with Stacks (Synchronized Methods and Synchronized Blocks)
52:44 - Using Objects as Locks
1:02:09 - Synchronization in Static Methods
1:03:45 - Rules of Synchronization
1:05:55 - Race Condition
1:06:55 - Thread Safety
01:07:20 - The Volatile Keyword
01:10:46 - Using the Volatile Keyword in Singleton Design Pattern
01:14:45 - Producer Consumer Problem (Designing a Blocking Queue) (Introducing wait() and notify())
01:31:45 - Thread States and Thread Transitions
01:36:17 - Running and Yielding of a Thread
01:37:20 - Sleeping and Waking Up of a Thread
01:39:07 - Waiting and Notifying of a Thread
01:42:28 - Thread Timed Out
01:43:36 - Interruption of a Thread
01:44:00 - Thread Joining
01:48:19 - Thread Priority
01:49:56 - Thread Scheduler
01:52:12 - Deadlocks
01:53:57 - Create a Deadlock in Java. (Interview Question)
01:57:03- Support my Content

πŸ”΄ Connect with me on Instagram - https://www.instagram.com/code.blooded.voyager/ and ask me doubts 1:1. Would try to reply to each one of you.

πŸ”΄ Full Collections Framework Crash Course in One Video : https://youtu.be/VE_AAUxTUCY

πŸ”΄ Join My Telegram Channel for Placement Updates - https://telegram.me/riddhi_dutta

πŸ”΄ Connect with me on LinkedIn - https://www.linkedin.com/in/riddhi-dutta

πŸ”΄ Connect with me on Twitter - https://twitter.com/rite2riddhi

πŸ”΄ Complete Java Developer roadmap - https://www.youtube.com/watch?v=C51hOHB2BQ4

πŸ”΄ Complete DSA Syllabus for cracking Product Based Companies : https://www.youtube.com/watch?v=SKtoKLbo2DI

πŸ”΄ My DSA Revision Strategy : https://www.youtube.com/watch?v=5Ql-xUEwiQY

πŸ”΄ My Low Level Design Preparation Strategy : https://www.youtube.com/watch?v=1wnAEemTNZ0

πŸ”΄Graph Placement Series From Scratch - https://youtube.com/playlist?list=PL4WwUkr0wZUTcTyJbjTQyrMhzcJqlNTDV

πŸ”΄ Low Level Design and Design Pattern Series - https://www.youtube.com/playlist?list=PL4WwUkr0wZUQHOVBzZnvA0tEk9sPqBrHm

πŸ”΄ My Company Review Series - https://www.youtube.com/watch?v=48zOpYDb3fI&list=PL4WwUkr0wZURrc_SDZAix_vx7fo1_cqWs

πŸ”΄ Amazon SDE Revision Sheet - https://www.youtube.com/watch?v=Y8Kzcw15sCs

πŸ”΄ Link to my TopicWise SDE Sheets Playlist : https://www.youtube.com/watch?v=SD9CbkCCLb4&list=PL4WwUkr0wZURmFqLT7QfkwkY3mE8IbtfJ

Tags
#java #javaprogramming #riddhiduttajava #javadeveloper #javadevelopment #javatutorial #spring #backenddeveloper #multithreadinginjava #multithreading #concurrency #javaconcurrency#backendwebdevelopment #collections #collectionframework
java concurrency
java concurrency and multithreading
java multithreading tutorial
java multithreading interview questions
java multithreading project
multithreading in java
multithreading interview questions in java
multithreading in os
java threads tutorial
java thread life cycle
java thread synchronization
java thread interview questions
java concurrency tutorial
java collection framework
java collection framework course
java collection framework crash course
java tutorial for beginners
java full course
how to learn java
java developer
java developer interview
java developer roadmap
java developer course
java developer work in company
java developer interview questions
java developer salary
java developer jobs for freshers
java developer interview questions for freshers
java developer skills needed
java developer interview questions for 2 years experience
java developer full course
java developer roadmap 2022
java developer salary in india
java developer roadmap 2023
java in programming language
java in project
java projects
java projects for beginners
java programming
java programming for beginners
java programming full course
java programs for practice
java projects with source code
java interview questions and answers
how to learn spring boot step by step
how to learn spring framework in java
how to learn spring
how to learn spring boot
dependency injection spring boot
@configuration in spring boot
how to learn spring boot from scratch
how to learn spring framework
java backend development tutorial
java backend
java backend developer
java backend projects
java backend developer full course
java backend tutorial
java backend developer interview questions
java backend roadmap
java backend course
java backend developer skills
java backend interview questions
java backend web development
logo Ask VidTutorAssistant
Comment
or
Question
Your name
Comments with generated responses
@yuvhrajverma9665
2023-03-14

In synchronization part u have created a single instance of stack class which is used by both of the threads then the lock must be same in synchronized method ? and also what happens when we do synchronize(new Object) , every time different object is getting created by diff threads ?how synchoronize determine that this is the lock? can u explain it in depth plz?

@rite2riddhi

Push and pop methods have the same lock

VidTutorAssistant (GPT-4)

Hi @yuvhrajverma9665, I appreciate your thoughtful queries.

To clarify your first question, a single instance of the class being used by both threads would indeed result in the same lock being acquired for synchronized methods. When a thread enters a synchronized instance method it acquires the lock for that method's object. If another thread tries to call a synchronized method on the same object, that thread get blocked because the object lock is already acquired.

Regarding your second question, 'synchronize(new Object())', here each time you are creating a new lock for each execution. The object you pass to the synchronized block is itself the lock. The lock object itself is completely arbitrary; it's only purpose is to provide a mutually-exclusive lock condition on the ongoing process, keeping other threads from entering the synchronized block.

Remember, the important part is not the particular object used as a lock. It's that once a thread grabs the lock for a particular object, no other thread can enter a critical section protected by that object's lock until the thread that originally grabbed the lock releases it.

I hope that offers a more in-depth explanation! Do let me know if you have any more queries. Keep coding!


@StellasAdi18
2023-03-17

Love the energy, passion and way you explain. Pure gem!

@rite2riddhi

Thanks aditya.

VidTutorAssistant (GPT-4)

Thank you, @StellasAdi18! Your kind words mean a lot and fuel me to keep creating more engaging and informative content. The passion comes from wanting to help you all have a better understanding of Java programming and I'm glad it resonates with you. Stay tuned for more, and don't forget to subscribe if you haven't already. Happy learning!