OOP Chapter 1
OOP Chapter 1
Object Oriented
Programming(OOP)
int sum = a + b;
System.out.println("The sum is: " + sum);
Types of Programming Paradigms
📌 A programming paradigm is a way of writing and organizing code.
🔹 Types of Programming Paradigms:
1️⃣ Procedural Programming
2️⃣ Logical Programming
3️⃣ Functional Programming
4️⃣ Object-Oriented Programming (OOP)
🔹 Characteristics:
✅ Uses declarative statements (what to do, not how to do)
✅ Focuses on relations and rules
✅ Common in AI and Expert Systems
History of Java
1991 – Started as "Oak" by James Gosling & team at Sun Microsystems.
1995 – Renamed to Java and officially released.
1996 – First stable Java version (JDK 1.0).
2006 – Open-sourced as OpenJDK.
2010 – Oracle acquired Sun Microsystems.
Present – Java is widely used in enterprise applications, cloud computing, and Android
development.
Java version, read:
https://www.oracle.com/java/technologies/downloads/?er=221886
Characteristics of Java Programming
1. Platform-Independent
•Follows "Write Once, Run Anywhere" (WORA) using Java Virtual Machine
(JVM).
2. Object-Oriented
•Based on OOP principles: Encapsulation, Inheritance, Polymorphism, and
Abstraction.
3. Simple and Secure
•Easy-to-learn syntax and built-in security features like memory management
and exception handling.
Characteristics of Java Programming
4. Portable
If any language supports platform independent and architectural neutral feature is
known as portable.
So, Java is a portable language.
5. Multi-threaded
A flow of control is known as a thread.
When any Language executes multiple thread at a time that language is known as
multithreaded.
Supports concurrent execution of multiple tasks for better performance.
9. Object Oriented
It supports OOP's
In java everything is Object which has some data and
behavior.
Java can be easily extended as it is based on Object Model.
Java Development Environment
1️⃣ Editing – Writing the Java program in an editor (e.g., VS Code, IntelliJ, Eclipse).
2️⃣ Compiling – Converting Java code (.java) into bytecode (.class).
3️⃣ Interpreting – The JVM interprets and executes bytecode on different platforms.
Java Compilation Process
🔹 Java Code → Compilation → Bytecode → Interpretation