📖 History
Java
was created in the 1990s by a team at Sun Microsystems (later bought by Oracle).
Java is a programming language that runs anywhere (Window, MAC, and Linux).
The famous slogan for java is: “Write
code once, run it anywhere.”
Real-Life
Example:
Imagine writing a letter in English ✉.
Whether your friend reads it in India, the USA, or Japan, they’ll understand
it—because the language is the same.
That’s how Java works—one
code, works everywhere.
⚡
Features of Java (Why it’s so popular!)
·
Simple – Easier to learn than
many other programming languages.
·
Object-Oriented – Helps you think of your
code like real-world objects (car, dog, bank account).
·
Secure – Used in banking,
healthcare, and big companies because it’s very safe.
·
Portable – Works on Windows, Mac,
Linux, Android… anywhere!
·
Robust – It doesn’t crash easily.
💻✨ Java Virtual Machine (JVM)
The JVM is like
a translator.
Your Java code is written in English-like commands, but computers only
understand 0s and 1s. The JVM translates your code into the computer’s language
so it can run anywhere.
Real-Life
Example:
Imagine you speak English, but you’re in France. You need a translator
to make locals understand you. JVM plays that translator role for Java
programs.
🛠
Java Development Kit (JDK)
The JDK is the toolbox
developers use to create Java programs. It includes everything:
·
Compiler
(turns code into machine language)
·
Libraries
(ready-made code you can reuse)
·
Tools
for testing and debugging
Real-Life
Example:
Think of the JDK like a kitchen
for a chef 🍳.
It has all the utensils, stoves, and ingredients needed to cook a dish (your
program).
⚙ Java
Runtime Environment (JRE)
The JRE is what
you need to run
a Java program. It doesn’t include tools to create programs—just enough to run
them.
Real-Life
Example:
Think of the JRE like a microwave
oven 🍕. You can’t cook
food from scratch in it, but you can easily heat and eat food made by
someone else.
👉In short:
- JDK = Chef’s kitchen (create
programs).
- JRE = Microwave (run programs).
- JVM = Translator (make computer
understand programs).
How They Work Together: A Quick Summary 🎬
1.
You (the Developer) use the JDK (your toolbox) to
write and build a program.
2.
You give your finished program to a friend.
3.
Your friend installs the JRE (the stage) on
their computer.
4.
When they run your program, the JVM (the magic
interpreter) inside the JRE brings it to life!
In essence:
- Developers (like you!) need the JDK to write
and compile Java code.
- Users only need the JRE to
run Java applications.
- The JVM is the critical
component inside the JRE that makes Java's "Write Once, Run
Anywhere" magic happen!
Writer - Inderjit Singh ✍🏼
Post a Comment