Loading...

MultiThreading in Java Theory

MultiThreading in Java Theory
Learn Multi-Threading in Java with Simple Example.
Using Thread class and Runnable Interface.

In computer science, a thread of execution is the smallest sequence of programmed instructions that can be managed independently by a scheduler, which is typically a part of the operating system.

The implementation of threads and processes differs between operating systems, but in most cases, a thread is a component of a process.

Multiple threads can exist within the same process and share resources such as memory, while different processes do not share these resources.
Using two different task at the same time means multi-tasking. The thread is unit of a process.


Recommend Books :

1. Head First Java : http://amzn.to/2owFrf0
2. Java Complete Reference : http://amzn.to/2osY04k

Editing Monitors :
https://amzn.to/2RfKWgL
https://amzn.to/2Q665JW
https://amzn.to/2OUP21a.

Editing Laptop :
ASUS ROG Strix - (new version) https://amzn.to/2RhumwO

Camera : https://amzn.to/2OR56AV
lens : https://amzn.to/2JihtQo

Mics
https://amzn.to/2RlIe9F
https://amzn.to/2yDkx5F

Check out our website: http://www.telusko.com

Follow Telusko on Twitter: https://twitter.com/navinreddy20

Follow on Facebook: 
Telusko : https://www.facebook.com/teluskolearnings
Navin Reddy : https://www.facebook.com/navintelusko

Follow Navin Reddy on Instagram: https://www.instagram.com/navinreddy20

Subscribe to our other channel:
Navin Reddy : https://www.youtube.com/channel/UCxmkk8bMSOF-UBF43z-pdGQ?sub_confirmation=1
Telusko Hindi :
https://www.youtube.com/channel/UCitzw4ROeTVGRRLnCPws-cw?sub_confirmation=1

Subscribe to the channel and learn Programming in easy way.

Java Tutorial for Beginners : https://goo.gl/p10QfB

Scala Tutorials for Java Developers : https://goo.gl/8H1aE5

C Tutorial Playlist : https://goo.gl/8v92pu

Android Tutorial for Beginners Playlist : https://goo.gl/MzlIUJ

XML Tutorial : https://goo.gl/Eo79do

Design Patterns in Java : https://goo.gl/Kd2MWE

Socket Programming in Java : https://goo.gl/jlMEbg

Spring MVC Tutorial : https://goo.gl/9ubbG2

OpenShift Tutorial for Beginners : https://goo.gl/s58BQH

Spring Framework with Maven : https://goo.gl/MaEluO

Sql Tutorial for Beginners : https://goo.gl/x3PrTg

String Handling in Java : https://goo.gl/zUdPwa

Array in Java : https://goo.gl/uXTaUy

Java Servlet : https://goo.gl/R5nHp8

Exception Handling in Java : https://goo.gl/N4NbAW

RRelated Posts

13.2 Multithreading in Java Practical

In computer science, a thread of execution is the smallest sequence of programmed instructions that can be managed independently by a scheduler, which is typically a part of the operating

Collection and Generics in Java Theory

Complete Playlist : https://goo.gl/8fxwmA Spring Boot Tutorials : https://goo.gl/7894NE Recommend Books : 1. Head First Java : http://amzn.to/2owFrf0 2. Java Complete Reference :

CComments

  • Jonathan Knorr
    Good video. Nicely explained.
  • Zulfequar Ali
    Explained so clearly!
  • Sudh Arrsun
    This is really amazing. The way you explain concepts. Thanx.
  • Vova Adamenko
    Hi, Navin, I am from Ukraine, and a want to tell You, thanks a lot for Your job. It s really helpful tutorials.
  • sejal gupta
    Explore how threads can be implemented in programming languages. Explain different ways
    to implement thread in java. Can we implement thread concept in C++ if yes how?
  • Anviksha Gupta
    Great video sir.
  • Cyber Gamer
    Thank you very much
  • Aravind Venkit
    What is the diff between multiprocessing and multithreading?
  • Vaibhav Jani
    Right?
  • Indu Devarashetty
    Thank you very much Brother
  • Indu Devarashetty
    Thank you very much Brother
  • Ali Hussain Khan
    very well explained
  • Mukhtar Ali
    Can you tell me the monitor and its types
  • John Bruder
    You're a very good teacher! I was really turned off when you welcomed back "aliens" How condescending. Don't spoil your ability to teach by looking down on others who have different skills than you. ...but keep up the good work.
  • Ananthram J
    A noob doubt here.. what happen if i run 8 threads on dual core machine?does each thread uses a whole core
  • Yuva Raj
    Explained well
  • sona
    Thank you sir for giving day to day life and real examples while explaining the topics.
  • phaze
    Why are you screaming?
  • Zeyad Ibrahim
    Nice Video !
  • Syed Waseemahmed
    My machine is oto core processor but in my application i created 10 threads application is running fine. How it is possible if one thread use one core processor ?????
  • Ganesh Kusundal
    Sorry, but I want to correct you that threads work on same core not on multiple cores, in that case it will be parallel programming.
  • Manveer Singh
    My God, you are so intelligent!
  • sruthi kuppili
    I learned lot from ur videos..thank you very much sir
  • Ezio Auditore Da Firenze
    OFFFFFFFFFF OUT OF THE WORLD SIR.......



    your videos are just awesome....VERY INFORMATIVE.....I LIKE IT........
  • saicharan kuppilli
    sir, please make an video of applet in java
  • Stiliyan Goranov
    Amazing !! Thank you, sir.
  • Mark Lee
    Well explained.
  • Rahul singh
    Hi Sir,

    I am facing problem to understand concurrent API, it would be great if you publish one video on this.
    Thank you very much for earlier videos.

    Thanks,
    Rahul S
  • Joleon Morcilla
    thankyou very much sir
  • Shiv Krishna Jaiswal
    3:00, Does java do "parallel processing" using thread? Coming from Python background, there is the separate mechanism for multithreading and multiprocessing(parallel processing). How to creating multithreading in java in which only one core is used and multithreading takes advantage of only "slice of time"?
  • Minhaj Ahmad
    Alien doesn't exist, US making fool.
  • Ahmed Khan
    Thank You Navin Sir , in less time I get to learn a concept fast ....all credit to your teaching.
  • sweta viswakarma
    thanku sir for delivering lecture in so simple way
    just awesome
  • Ayush Rawat
    ausm work sir
  • veeranjaneyareddy yeruva
    Super
  • suneel kumar
    hi sir,
    I was having a task like, where i have to insert/update A LOT OF DATA like 1000 rows with 80 colums each on clicking if a button in the sqlite local DB, for that i was creating a thread.. in that thread i was creating a method like dbLogic(), the thing is after completion of the task i.e; insertion/updation completion i have to show an alert dialog, that alert dialog code i have written normally not in the thread..In some times the main problem causing is, the alert dialog is coming before only unless my another thread doesn't completed its work, i was trying to store 1000 data, in some times it was storing 200 data and the alert was coming,in some times it was storing 400 data alert was coming,in sometimes it was storing 550 or 600 or 650 the alert box was coming.. what i need is after successfully completion of the task only my main thread should execute. i heard that thread is an independent process... what to do please help me..
  • Mrinalini mini
    U are confusing me !!
  • Elkhan Hamet
    Amazing video!!! Thank you sir, so much!!!
  • StockLilves
    Subbed :D
  • Iresh Dissanayaka
    Thank you so much! This helped a lot.
  • Aatish Zadee
    Best teacher ever I seen on YouTube
  • Adambobobmb
    only guy i trust lol
  • Md. Mahadi Hossain
    cool!!
  • Rohit Mahendran
    sir why dont we write MyThread t1 = new MyThread(); instead of
    Thread t1 = new MyThread();
  • Bharadwaj Anjan Gollapudi
    Great explanation.
  • madhura karkera
    Thank you so much sir.......
  • ullash saha
    You are really good
  • Jyoti ranjan mohapatra
    is java easier?
    can i do java without learning c
  • Jarmahent
    What if you create 8 different threads and another computer that doesn't have 8 cores runs the program?
  • MALLIKARJUN HAGARAGI
    thnku sir