Advanced_Java_Syllabus
Advanced_Java_Syllabus
2. Multithreading
2.1 Introduction to Multithreading: Multithreading allows the concurrent execution of
two or more threads for maximum CPU utilization.
2.2 Thread Creation: Thread Class, Runnable Interface: - Extending Thread: Create a
class that extends Thread and overrides the run() method.
- Implementing Runnable: Create a class that implements Runnable and overrides run().
2.3 Life Cycle of Thread: - New: Thread object created.
- Runnable: Thread ready to run.
- Running: Thread executing.
- Waiting/Blocked: Thread waiting for resources.
- Terminated: Thread completes execution.
2.4 Thread Priority: Assign priority using setPriority(). Priorities range from 1
(MIN_PRIORITY) to 10 (MAX_PRIORITY).
2.5 Execution of Thread Application: Thread starts using the start() method, invoking
the run() method.
2.6 Synchronization and Inter-thread Communication: - Synchronization: Ensures only
one thread accesses a critical section at a time.
- Inter-thread Communication: Achieved using methods like wait(), notify(), notifyAll().
3. Networking
3.1 Overview of Networking: Networking in Java involves the use of classes like Socket,
ServerSocket, and DatagramSocket.
3.2 Networking Basics: Port Number, Protocols, and Classes: - Port Number: Logical
address to identify a process.
- Protocols: Rules for data exchange (e.g., TCP, UDP).
- Classes include InetAddress, Socket, ServerSocket.
3.3 Sockets, Reading from and Writing to a Socket: - Socket: Provides connection
between two machines.
- Reading/Writing: Input/output streams for communication.