JAVA PROGRAMMING
AKTU [Link] Curriculum Study Notes
Unit 1: Introduction to Java
Java is a high-level, class-based, object-oriented programming language designed to have as few
implementation dependencies as possible (WORA - Write Once, Run Anywhere).
JVM, JRE, and JDK
• JVM (Java Virtual Machine): An abstract machine that provides a runtime environment in
which Java bytecode can be executed.
• JRE (Java Runtime Environment): Includes JVM, browser plugins, and Java applets
support.
• JDK (Java Development Kit): Contains JRE and development tools (compiler, debugger).
Features of Java
Simple, Object-Oriented, Distributed, Interpreted, Robust, Secure, Architecture-Neutral, Portable,
High Performance, Multithreaded, and Dynamic.
Unit 2: Basic Syntax & Control Structures
Data Types
• Primitive: byte, short, int, long, float, double, boolean, char.
• Non-Primitive: String, Array, Class, Interface.
Control Flow
Includes decision-making statements (if-else, switch) and looping statements (for, while,
do-while).
for(int i=0; i<5; i++) {
[Link]("Iteration: " + i);
}
Page 1
Unit 3: Object-Oriented Programming (OOP)
Classes and Objects
A class is a template for objects, and an object is an instance of a class.
Inheritance
Use of extends keyword to inherit properties. Java does not support multiple inheritance with
classes to avoid the Diamond Problem.
Polymorphism
• Method Overloading: Same method name, different parameters (Compile-time).
• Method Overriding: Same method signature in parent and child class (Runtime).
Abstraction & Interfaces
Abstract classes use abstract keyword. Interfaces use interface and allow for multiple
inheritance implementation.
Unit 4: Exception Handling & Multithreading
Exception Handling
Hierarchy: Throwable → Error and Exception.
try {
int data = 50 / 0;
} catch (ArithmeticException e) {
[Link](e);
} finally {
[Link]("Always executed");
}
Multithreading
Can be achieved by extending the Thread class or implementing the Runnable interface.
Page 2
Unit 5: I/O Streams & Applets/Swing
Java I/O
Uses Streams to read and write data. InputStream and OutputStream (Byte-oriented), Reader
and Writer (Character-oriented).
Collections Framework
Standardized way to handle a group of objects. Key interfaces: List, Set, Map.
Page 3