What is Java?
Java is one of the world's most popular programming languages. It is used to build:
Android applications
Desktop applications
Web applications
Enterprise systems
Games
Banking software
Why Learn Java?
✅ Easy to learn
✅ Object-Oriented Programming (OOP)
✅ Cross-platform ("Write Once, Run Anywhere")
✅ High demand in the job market
✅ Great foundation for learning other languages
Chapter 1: Installing Java
Step 1: Install JDK
Download the Java Development Kit (JDK):
Oracle JDK Download
Step 2: Install VS Code
Visual Studio Code
Step 3: Install Java Extension Pack
Open VS Code → Extensions → Search:
Java Extension Pack
Install it.
, Chapter 2: Your First Java Program
Create a file:
public class Main {
public static void main(String[] args) {
System.out.println("Hello World!");
}
}
Output:
Hello World!
Understanding the Code
public class Main
Creates a class named Main.
public static void main(String[] args)
The starting point of every Java program.
System.out.println()
Prints text to the screen.
Chapter 3: Variables
Variables store data.
public class Main {
public static void main(String[] args) {
String name = "John";
int age = 20;
double salary = 2500.50;
boolean student = true;
System.out.println(name);
}
}