Tag: threading

Multi Threading in Java

Java
Tables Introduction Thread vs Process in Java Multitasking vs Multithreading vs Multiprocessing vs parallel processing Life cycle of a Thread Thread priorities Create a thread in Java Thread creation by extending Thread class Thread creation by implementing Runable Interface Method: isAlive() and join() Synchronization Inter-thread Communication Introduction ⤴ Thread vs Process in Java ⤴ Both process and Thread are independent path of execution but one process can have multiple Threads. Every process has its own memory space, executable code and a unique process identifier (PID) while every thread has its own stack in Java but it uses process main memory and share it with other threads. Threads are also refereed as task or light