i
Understanding Requirement: Why Java
Why Java is important to the Internet
Java On Linux
First Java Program
Java Virtual Machine Architecture
Class Loading Process by Class Loaders
Role Of Just In Time Compiler
Execution Engine
Data Types
Variables
Arrays
Operators
Arithmetic Operations
Shifting Operators
Logical Operators
Control Statements
Object Oriented Paradigms
The Three OOP principles
Looping Statements
JAVA Class Fundamentals
Command Line Arguments
Static Initialize
Creating an Object
Instance Variable Hiding
Overriding and Overloading of methods
Understanding The Access Controls
Nested And Inner Classes
Dynamic Method Dispatching
Abstract Classes
Using Final To Prevent Overriding & Inheritance
Garbage Collection
Defining a package
Understanding Classpath
Access Protection
Importing packages
Defining and Implementing An Interface
Abstract classes vs Interfaces
Generics
Annotations
Varargs
Foreach
Fundamentals Of Exception Handling
Types Of Exceptions
Learning exception handling, try-catch, multiple catch clauses
Nested Try Statements
Throw, Throws and Finally
Custom Exceptions
Java Thread Model
Creating A Thread
Context Switching
Synchronization: Methods And Statements
Inter-thread Communication
Before starting explaining actual thread model and multithreading in Java, let’s quickly review why it is beneficial to use threading. First of all, it must be mentioned that if we don’t use threading properly, instead of improvement, our performance can be decreased.
On the image there are the stages which thread can have. Let’s review each of it:
New – This is the state where the new thread begins its lifecycle. Thread will stay in this state until the program starts the it.
Runnable – After running of newly born thread, it will move to this state. A thread which is in Runnable state is considered to be executing its task.
Waiting – This is the state when a thread is waiting for another thread to finish its task. It will move again to the runnable state only when another thread give the signal of waiting thread to continue its task.
Timed Waiting – This is the same state as waiting, but when we have specific amount of time defined for waiting. It will move back to Runnable state when time interval expires or it gets signal.
Terminated (Dead) – After completing task, thread is moving to terminated state.
Don't miss out!