Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
20 views7 pages

JAVA

Java is a versatile computer programming language used for creating software and applications, known for its strong, easy-to-use, and secure features. It supports various applications including desktop apps, websites, mobile apps, and more, and is designed to be platform-independent, allowing code to run on any device without modification. Java was developed by Sun Microsystems in 1995 and has become a popular choice for both beginners and professionals due to its simplicity and robust security features.

Uploaded by

Kusam Thakur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views7 pages

JAVA

Java is a versatile computer programming language used for creating software and applications, known for its strong, easy-to-use, and secure features. It supports various applications including desktop apps, websites, mobile apps, and more, and is designed to be platform-independent, allowing code to run on any device without modification. Java was developed by Sun Microsystems in 1995 and has become a popular choice for both beginners and professionals due to its simplicity and robust security features.

Uploaded by

Kusam Thakur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

What is Java?

Java ek computer programming language hai jo software aur applications banane ke liye use
hoti hai. Ye strong (mazboot), use karne mein easy (aasan), aur secure (surakshit) hai.
Java ki khaas baat ye hai ki ye sirf ek language nahi hai. Java ke saath kuch special tools bhi
aate hain, jaise:
1. JRE (Java Runtime Environment): Jo Java programs ko computer ya devices par
chalane ke liye zaruri hota hai.
2. API (Application Programming Interface): Ready-made tools aur functions ka
collection jo developers ka kaam aasan banata hai.
Is wajah se Java ek platform bhi kehlata hai, kyunki ye alag-alag devices par kaam kar sakta
hai.
Java ko 1995 mein Sun Microsystems ki team ne banaya tha (ab ye Oracle ka part hai).
Pehle iska naam Oak rakha gaya tha, lekin baad mein ise Java kar diya gaya kyunki "Oak"
naam pehle se ek company ke paas tha.
Java ke Applications
1. Desktop Apps:
Ye woh programs hote hain jo computer par chalate hain, jaise:
o File open karne wale tools
o Video dekhne wale apps
o Antivirus software (jo computer ko safe rakhta hai)
2. Websites:
Java ka use websites banane ke liye hota hai, jaise:
o Train tickets book karne waali websites
o Programming seekhne waali websites
3. Big Business Apps (Bade Companies ke Software):
o Banks Java ka use karte hain accounts aur paise ka management karne ke liye.
o Business ke zaruri kaam chalane ke liye Java ki madad lete hain.
4. Mobile Apps:
Java ka use karke phone aur tablet ke apps bante hain. Bahut saari Android apps Java
me likhi jaati hain.
5. Little Devices (Chhoti Devices):

Notes by Kusam Thakur


o Coffee maker ya smart thermostat jaise devices me Java ka use hota hai.
6. Smart Cards:
o Credit card ya sim card jaise cards me ek chhota computer hota hai, jo Java ki
madad se kaam karta hai.
7. Robots:
o Java ka use robots ko control karne aur chalane ke liye hota hai.
8. Games:
o Bahut saare fun games (phone aur computer ke liye) Java ka use karke banaye
jaate hain.
Java har jagah use hota hai—computer se lekar chhoti devices aur bade business software
tak.
Java ke Features (Special Qualities)
1. Simple (Aasaan):
o Java ko seekhna aur samajhna easy hai.
o Iska syntax (writing style) clean aur straightforward hai.
o Extra aur complex features hata diye gaye hain, jo programming ko easy banata
hai.
2. Object-Oriented (Object par based):
o Java mein sab kuch objects ke roop mein treat hota hai.
o Object ka matlab: Data aur us par hone wale kaam ek saath organize karte hain.
o Ye feature software ko organize aur design karna easy banata hai.
3. Platform Independent (Har Platform pe chale):
o Ek baar Java ka code likho, aur ye har computer (Windows, Linux, Mac) pe
chal sakta hai bina changes ke.
o Is wajah se Java "Write Once, Run Anywhere" (WORA) kehlata hai.
4. Secured (Surakshit):
o Java mein security ke special features hain.
o Explicit pointers nahi hote, jo code ko safe banata hai.
o Java ke programs ek secure environment mein chalte hain.

Notes by Kusam Thakur


5. Robust (Mazboot aur Reliable):
o Java memory ka dhyan rakhta hai (Automatic Garbage Collection karta hai).
o Errors (galtiyan) handle karne ke strong tools hain, jo programs ko crash hone
se bachate hain.
6. Architecture-Neutral (Har System ke liye suitable):
o Java kisi ek system pe dependent nahi hai.
o Data types ka size fix hai, isliye Java har jagah same result deta hai.
7. Portable (Le jaane layak):
o Java ka code (bytecode) kisi bhi platform par chal sakta hai bina modify kiye.
o Ye Java ko versatile banata hai.
8. High Performance (Tez aur Effective):
o C++ jitna fast toh nahi, lekin Java ka bytecode native code ke kareeb hota hai,
jo fast performance deta hai.
9. Distributed (Connected Systems ke liye):
o Java se aise apps ban sakte hain jo alag-alag computers ke files aur resources
use karte hain (Internet pe).
10.Multithreaded (Ek saath multiple kaam):
 Java mein ek program mein ek saath alag-alag kaam kar sakte hain (e.g., video dekhte
waqt background download).
11.Dynamic (Flexible):
 Java classes ko dynamic (runtime pe load hone wala) support karta hai.
 C aur C++ jaise languages ke functions ko include kar sakta hai.
Java kyun Seekhein?
 Seekhne mein aasan hai.
 Har platform par kaam karta hai.
 Object-Oriented approach se software ka design improve hota hai.
 Har tarah ke applications banane ke liye useful hai (websites, mobile apps, etc.).

Notes by Kusam Thakur


Java vs C++
Feature C++ Java
Platform - Platform Dependent: Har - Platform Independent: Code ek
Dependency platform ke liye code alag baar likho aur Java Virtual Machine
compile karna padta hai. (JVM) pe har jagah chalao.
Usage - System programming ke liye - Applications (websites, mobile
zyada use hota hai. apps, business apps) banane ke liye
zyada use hota hai.
Complexity - Syntax thoda complex hota - Beginner-friendly hai, aur syntax
hai, beginners ke liye mushkil clean aur simple hai.
ho sakta hai.
Memory - Manually karna padta hai (e.g., - Automatic memory management
Management new, delete, ya malloc/free). hoti hai (Garbage Collection).
Programming - Procedural aur Object- - Sirf Object-Oriented style ko
Style Oriented dono styles ko support follow karta hai.
karta hai.
Pointers - Pointers ka explicit support - Explicit pointers ka support nahi
hota hai (direct memory hai, JVM memory manage karta hai.
manipulation kar sakte hain).
Exception - try-catch aur throw ka use - Simplified try-catch system use
Handling karta hai exception handle karne karta hai, exceptions ke details
ke liye. explicitly dene ki zarurat nahi.
Main Objective - Low-level tasks aur hardware- - Cross-platform apps aur web-based
related kaam ke liye zyada kaam ke liye bana hai.
useful hai.

Java Kyun Banaya Gaya?


 Har Device pe Chale (Works Everywhere):
Ek language chahiye thi jo ek baar likhi jaaye aur har device pe bina badle chal sake.
 Network-Based Applications (Internet Apps):
Jab internet grow kar raha tha, tab Java ko aise programs banane ke liye design kiya
gaya jo network pe kaam karein.

Notes by Kusam Thakur


 Simple aur Reusable Code:
Java Object-Oriented Programming ka use karta hai, jo code ko organize aur reuse
karne mein madad karta hai.
 Surakshit aur Safe (Secure):
Java mein security features hote hain jo internet pe hone wale security issues ko rokne
mein madad karte hain.
 Aasaan aur Familiar:
Java ka syntax simple hai aur C/C++ jaise dikhai deta hai, jo naye programmers ke
liye friendly hai.
Key Takeaway:
 C++: Advanced programmers ke liye zyada powerful hai, lekin beginners ke liye
mushkil ho sakta hai.
 Java: Beginners ke liye best hai, secure aur easy to use hai, aur har platform pe kaam
karta hai.

JVM (Java Virtual Machine)


 Kaam Kya Hai: JVM ek translator hai jo Java ke bytecode ko samajhta aur aapke
computer ki language mein chalata hai.
Java ka code sabse pehle bytecode mein convert hota hai, aur JVM is bytecode ko
aapke system pe execute karta hai.
 Key Points:
o Virtual Machine: Ye ek sochne wala machine hai, jo physically nahi hota, par
software ke roop mein hota hai.
o Platform-Specific: Har OS (Windows, Mac, Linux) ke liye alag JVM hota hai.
o Role: Java programs ko execute karna.
JRE (Java Runtime Environment)
 Kaam Kya Hai: JRE ek package hai jo JVM aur libraries ka collection hai. Ye ensure
karta hai ki Java program properly chal sake.
 Key Points:
o JVM ke saath-saath libraries aur jar files ko include karta hai.
o Sirf Java programs ko chalane ke liye hota hai, banane ke liye nahi.
o Har system ke liye alag JRE hota hai (Windows JRE, Mac JRE).
Notes by Kusam Thakur
JDK (Java Development Kit)
 Kaam Kya Hai: JDK developers ka toolbox hai. Isme JRE, JVM ke saath extra
tools hote hain jaise compiler (javac) aur debugger.
 Key Points:
o Java banane aur chalane ke dono tools include karta hai.
o JRE + development tools = JDK.
o Developer ke liye zaruri hai agar aap Java applications banate ho.

Difference Between JVM, JRE, and JDK


Feature JVM JRE JDK
Definition Java Virtual Java Runtime Java Development Kit -
Machine - Java Environment - Runtime Java applications banata
code ko chalata hai. tools provide karta hai. aur chalata hai.
Purpose Sirf bytecode Programs run karna. Develop aur run dono ka
execute karna. kaam karta hai.
Contains Execution engine. JVM + libraries + jar JRE + tools like compiler,
files. debugger.
Developer No (end-users ke No (end-users ke liye). Yes (developers ke liye).
Use liye).
How Java Achieves Platform Independence?
 Write Once, Run Anywhere (WORA): Java code ko ek baar likhne ke baad har
system pe chalaya jaa sakta hai, bina kisi change ke.
 Compilation Process:
1. Java ka source code (.java) ko compiler (javac) bytecode (.class) mein convert
karta hai.
2. Bytecode universal language ki tarah kaam karta hai jo JVM samajh sakta hai.
 JVM as a Translator: JVM bytecode ko aapke OS ke liye specific machine code
mein convert karta hai. Har platform ke liye alag JVM hota hai, par bytecode har jagah
same hota hai.

Notes by Kusam Thakur


 Platform-Specific JVM: JVM ka alag version har platform pe hota hai (Windows
JVM, Mac JVM, etc.), jo bytecode ko system-specific machine code mein translate
karta hai.
Ek Example Se Samajho:
1. Aapka Code:
System.out.println("Hello, World!");
2. Compiler (JDK):
Is code ko bytecode (.class file) mein convert karega.
3. JVM:
Bytecode ko read karega aur OS ke according execute karega:
o Agar Windows pe chalate ho, Windows JVM use karega.
o Agar Mac pe chalate ho, Mac JVM use karega.
4. Result:
"Hello, World!" har system pe same output dega, bina code badle.

Notes by Kusam Thakur

You might also like