JAVA
THE KING OF OBJECT-ORIENTED
PROGRAMMING
DEPARTMENT~ PRESENTED BY~
CSE(AI&ML) CH.AKHIL GOUD(23TP1A6624)
B.VAISHNAVI (23TP1A6622)
.
REALITY
"Have you ever wondered why Java
is still one of the most popular
programming languages after nearly
three decades?
Did you know that more than 3
billion devices run Java today?"
WHAT IS JAVA?..
Java is one of the most popular and widely used programming
languages in the world. It is known for its strong object-oriented
programming (OOP) capabilities, platform independence, security, and
versatility in various domains such as web development, enterprise
applications, and mobile development. This document explores why
Java is considered the king of object-oriented programming.
HISTORY OF JAVA
The Birth of Java (1991 – 1995)
• Origin: Created by James Gosling and his team at Sun Microsystems in 1991.
• 💡 Initial Purpose: Designed for smart appliances (TVs, microwaves, etc.), but
later adapted for the internet.
• 📝 First Name: Java was originally called Oak (named after an oak tree outside
Gosling’s office).
• 🌍 Internet Revolution: In 1995, Java was officially released and gained popularity
for web applications.
The Evolution of Java (1996 – 2010)
📅 1996 – Java 1.0: First public release; introduced JVM (Java Virtual Machine).
📅 1998 – Java 2: Added Swing GUI, Collections Framework.
📅 2004 – Java 5: Introduced Generics, Multithreading, and Enhanced for-loop.
📅 2006 – Java 6: Focus on Web Services & Performance.
📅 2010 – Java 7: Oracle Corporation took over Java after acquiring Sun Microsystems.
Modern Java (2011 – Present)
📅 2014 – Java 8: Biggest upgrade! Introduced Lambda Expressions, Streams API, and
Functional Programming.
📅 2017 – Java 9: Introduced Modules for large applications.
📅 2018 – Java 11: First Long-Term Support (LTS) version, making Java more stable.
📅 2021 – Java 17: More performance improvements, sealed classes, pattern
matching.
📅 2023 – Java 21: Introduced Virtual Threads, Record Patterns, and AI-friendly
features.
IS JAVA SIMPLE…?
SYNTAX IS SIMPLE (WRITTEN IN ENGLISH)…..
PLATFORM INDEPENDENT(WORA)…..
NO POINTERS ……
FEATURES OF JAVA
Java has several features that make it the leading object-oriented programming language:
a) 100% Object-Oriented (With Few Exceptions):
Although Java has primitive data types like int, char, and double, these can be wrapped using wrapper
classes (Integer, Character, Double), making Java close to being purely object-oriented.
b) Platform Independence (Write Once, Run Anywhere - WORA):
Java code is compiled into bytecode, which runs on the Java Virtual Machine (JVM). This allows Java
programs to run on different platforms without modification.
c) Robust Memory Management:
Java has automatic garbage collection, which prevents memory leaks and
ensures efficient memory utilization.
d) Multi-threading Support: Java allows concurrent programming using
multithreading, making applications more efficient and responsive.
e) Security Features: Java provides strong security mechanisms such as
bytecode verification, exception handling, and access control.
JDK(Java Development Kit) vs JRE(Java
RunTime Environment) vs JVM(Java Virtual
Memory)
JDK:USED TO COMPILE THE CODE
JDK = JVM+JRE
JVM(JAVA VIRTUAL MACHINE)
JRE: the software required to run Java applications.
JVM:program that runs Java bytecode and converts it into machine code for execution.
SIMPLE PROGRAM
Public class Java{
Public static void main(String[] args){
System.out.println(“this is a java program”);
}
}
OOPs(OBJECT ORIENTED PROGRAMMING)
OOPs is a concept which is used to bring the real-world things
into programming world.
Basically,there are 6 principles.They are
1.Class 2.Objects
3.Encapsulation 4.Inheritance
5.Polymorphism 6.Abstraction
OOPs Principle
CLASS:
A class is a blueprint/template for creating objects. It defines properties (variables) and
behaviors (methods).
OBJECT:
An object is an instance of a class. It represents real-world entities with state and
behavior.
class Pen{
String color = “ Blue“; OUTPUT:
String type = “Ball”; this is a blue ball
pen
Public void write(){
System.out.println(“this is a blue ball pen”);
}
}
Public class Oops {
public static void main( String[] args){
Pen p1 = new Pen();
p1.color;
p1.type;
p1.write();
}
Oops principle
1.Inheritance → Allows a class to inherit properties and
methods from another class (Code reusability).
2.Encapsulation → Hides data using private variables
and provides access through methods.
Oops principle
1.Polymorphism → One function, multiple forms
(Method Overloading & Overriding).
2. Abstraction → Hides complex implementation, showing only
essential details .
REAL-WORLD APPLICATIONS OF JAVA
Web Development – websites , portals….
Mobile Development– Android apps like spotify
Enterprise Applications –Banking, e-commerce.
Game Development–Minecraft are developed using Java
Cloud Computing– Java is widely used in AWS, Google Cloud, and Azure
CONCLUSION
Java remains the king of object-oriented programming due to its
powerful OOP principles, platform independence, security, and
widespread applications in various domains. With continuous
improvements in Java versions, it remains a top choice for developers
in web, enterprise, and mobile application development .
GUESS THE OUTPUT??
Public class Java{
Public static void main(String[] args){
System.out.println(this is a java program);
}
}