Introduction to Java
What is Java?
Java is a high-level, object-oriented, class-based programming language.
It was developed by James Gosling at Sun Microsystems in 1995 (now owned by
Oracle).
Famous for its principle: “Write Once, Run Anywhere” (WORA).
Key Features of Java:
Platform Independent – Programs run on any OS using the JVM (Java Virtual
Machine).
Object-Oriented – Uses classes & objects (supports inheritance, polymorphism,
encapsulation, abstraction).
Simple & Secure – Easier than C++ (no pointers for security).
Robust – Strong memory management, exception handling.
Multithreaded – Supports parallel execution.
Distributed – Supports networking & RMI for distributed apps.
Portable – Same code works on Windows, Linux, Mac.
Java Architecture:
JDK (Java Development Kit) → For developers (contains compiler + tools).
JRE (Java Runtime Environment) → For running Java apps (JVM + libraries).
JVM (Java Virtual Machine) → Executes Java bytecode.
Process:
Source Code (.java) → Compiler (javac) → Bytecode (.class) → JVM → Machine Code
Java Editions:
Java SE (Standard Edition) → Core Java (used for DSA, desktop apps).
Java EE (Enterprise Edition) → For web & enterprise apps.
Java ME (Micro Edition) → For embedded/mobile devices.
JavaFX → For GUI applications.
SYNTAX:
FIRST PROGRAM:
--------------------------------------------------------------------------------------------------------------------------
public class Hello {
public static void main(String[] args) {
[Link]("Hello, Java!");
--------------------------------------------------------------------------------------------------------------------------
Where Java is Used?
Web Applications (Spring, Hibernate)
Android Development
Big Data (Hadoop, Spark)
Desktop Apps
Game Development
Cloud & Enterprise Applications
INSTALLATION OF JAVA:
DOWNLOAD THIS FILE AND INSTALL IT:
[Link]