INTRODUCTION AND
HISTORY OF JAVA
Presented by: Shreel Gandhi
Date: March 15,2025
What is Java?
• Java is a high-level, object-oriented, and platform-independent
programming language,developed by Sun Microsystems (acquired by
Oracle in 2010).
• Follows the "Write Once, Run Anywhere" (WORA) principle.
• Used in web applications, mobile apps, enterprise software, game
development, and more.
Java Features
• Simple
• Object Oriented Language
• Robust
• Dynamic
• Interpreted
• Platform-Independent
• Multithreaded
• High Performance
• Architecture Neutral
• Distributed
• Portable
• Secured
Java Consists of:
[Link] (Java Development Kit)→ Needed for Java
Development (Includes JRE + Development Tools)
JDK includes:JRE (to run Java programs).Compiler
(javac) to convert source code into bytecode.
Debugger, Documentation tools, and other
utilities.
JDK is required to write, compile, and
execute Java programs
2. JRE (Java Runtime Environment)→ Provides
Everything Needed to Run Java Programs
JRE includes JVM + libraries + runtime
dependencies to run Java applications.
It does not include development tools like a
[Link] you only want to run Java programs
(not develop them), installing JRE is enough.
[Link](Java Virtual Machine)
JVM is an engine that runs Java applications by
converting Java bytecode into machine code.
It provides features like memory management,
garbage collection, and security.
JVM is platform-dependent, meaning different
operating systems have different JVM
implementations.
Java Code Execution:
History of Java
Java has a rich history that started in the early 1990s.
It was designed to be simple, robust, and platform-
independent. Let’s look at its evolution.
3. Java’s Expansion (2000-2010)2004 (Java 5):Introduced Generics,
1. The Beginning (1991-1995)1991: Java was Enhanced for-loop, and Autoboxing.2006 (Java 6):Improved performance
initially developed as Project Oak by James and introduced Scripting API.2010: Oracle acquired Sun Microsystems,
Gosling and his team at Sun [Link] making Java part of Oracle’s technology stack.
"Oak"? It was named after an oak tree outside
Gosling’s [Link]: Originally created for 4. Modern Java (2011-Present)2014 (Java 8):
embedded systems and interactive televisions,
but it was too advanced for TV hardware at the One of the most significant updates:Lambda Expressions (functional
programming support).Streams API for handling data efficiently.
time.1995: Sun Microsystems officially launched
Java 1.0, and it became one of the first Date & Time API (replacement for [Link]).2017 (Java 9-
10):Introduced the Java Module System to improve scalability.
languages to support internet-based
applications.📌 Fun Fact: Java was almost named 2018 (Java 11 – LTS Version):Long-Term Support (LTS) for enterprise
[Link] JavaFX from core libraries
"Greentalk" before being renamed to Java,
inspired by Java coffee beans! .2021 (Java 17 – Latest LTS Version):Performance improvements, better
garbage collection, and security updates.
2. 2. Java’s Early Growth (1996-2000)1996: First
official Java Development Kit (JDK 1.0) was
released.1998: Java 2 (JDK 1.2) introduced:Swing
for GUI applicationsCollections FrameworkJava
Enterprise Edition (J2EE) for large-scale
[Link] gained massive popularity in
web development and enterprise applications.
OOPS in Java
Object oriented programming(OOP) is based on objects and class.
[Link]
[Link]
[Link]
[Link]
Encapsulation
class Student {
• Encapsulation is one of the four fundamental private String name;
principles of Object-Oriented Programming (OOP).
It refers to the hiding of data (variables) inside a public void setName(String newName) {
class and restricting direct access to them. name = newName;
Instead, data is accessed and modified using
getter and setter methods. }
• Key Features of Encapsulation: public String getName() {
• ✔ Data Hiding – Variables are declared as private. return name;
• ✔ Controlled Access – Public methods (getters }
and setters) control how data is modified.
} public class Main {
• ✔ Improves Security – Prevents unintended
modifications. public static void main(String[] args) {
Student s = new Student();
• ✔ Enhances Maintainability – Makes code more [Link]("Shreel");
readable and modular. [Link]("Student Name: " +
[Link]());
}
}
abstract class Animal {
Abstraction abstract void sound();
void sleep() {
[Link]("Sleeping...");
• Abstraction is one of the fundamental concepts of
Object-Oriented Programming (OOP). }
• It is the process of hiding implementation details } class Dog extends Animal {
and only exposing the essential features of an
object. void sound() {
• In Java, abstraction is achieved using:1. Abstract [Link]("Barks");
Classes (abstract keyword)2. Interfaces---Key }
Features of Abstraction:
}
• ✔ Hides Complexity – The user only interacts with
the necessary details public class Main {
• .✔ Increases Security – Internal logic is protected. public static void main(String[] args) {
• ✔ Improves Code Reusability – Common features Dog d = new Dog();
are implemented once.
[Link]();
• ✔ Simplifies Maintenance – Changes in
implementation do not affect the user. [Link]();
}
}
Inheritance class Vehicle {
void run() {
[Link]("Vehicle is running");
• Inheritance is an Object-Oriented Programming (OOP) concept
that allows one class (child/subclass) to inherit the properties }
and behaviors of another class (parent/superclass). This enables
code reusability and hierarchical relationships. }
• Key Features of Inheritance:✔ Code Reusability – Avoids class Car extends Vehicle {
redundant code by reusing existing code.
void show() {
• ✔ Hierarchical Structure – Creates relationships between
classes. [Link]("Car is running");
• ✔ Extensibility – Allows adding new features without modifying }
existing code. }
• ✔ Improves Maintainability – Reduces duplication and makes public class Main {
code easier to update.
• Types of Inheritance in Java: public static void main(String[] args) {
[Link] Inheritance – One class inherits from another. Car c = new Car();
2. Multilevel Inheritance – A class inherits from another class, [Link]();
which itself inherits from another. [Link]();
3. Hierarchical Inheritance – Multiple child classes inherit from one }
parent.
}
4. Multiple Inheritance (via Interfaces) – A class implements
multiple interfaces.
Polymorphism
• Polymorphism is an Object-Oriented Programming (OOP) Compile-Time Polymorphism
concept that allows a single method, class, or interface to
take multiple forms. The word "Polymorphism" means "many class MathOperations {
shapes".
int add(int a, int b) {
• In Java, polymorphism is achieved through:
return a + b;
• 1. Method Overloading (Compile-time polymorphism) }
• 2. Method Overriding (Runtime polymorphism) double add(double a, double b) {
• Key Features of Polymorphism:✔ Improves Code Reusability
– The same method can be used for different tasks. return a + b;
• ✔ Enhances Readability – Reduces the need for multiple }
method names. }
• ✔ Supports Flexibility – Objects can behave differently based public class Main {
on context.
public static void main(String[] args) {
• ✔ Improves Maintainability – Easier to update and
extend functionality. MathOperations obj = new MathOperations();
[Link]("Sum (int): " + [Link](5, 10));
[Link]("Sum (double): " + [Link](5.5, 2.2));
}
}
Run Time Polymorphism
class Parent {
void show() {
[Link]("Parent class method"); }
}
class Child extends Parent {
void show() {
[Link]("Child class method"); }
}
public class Main {
public static void main(String[] args) {
Parent obj = new Child();
[Link]();
}
}