- Java Notes
- Project-Based Java Learning Checklist
- Java Interview Preparation Checklist
- Java Beginner β Advanced Roadmap
- Resources
- Java is a high-level, object-oriented programming language.
- Write Once, Run Anywhere.
- Platform Independent via JVM.
- Automatic Garbage Collection.
public class Main {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}| Type | Size | Example |
|---|---|---|
| byte | 1 byte | 10 |
| short | 2 bytes | 1000 |
| int | 4 bytes | 100000 |
| long | 8 bytes | 10000000L |
| float | 4 bytes | 10.5f |
| double | 8 bytes | 10.5 |
| char | 2 bytes | 'A' |
| boolean | 1 bit | true/false |
// Arithmetic
+ - * / %
// Relational
== != > < >= <=
// Logical
&& || !
// Assignment
= += -= *= /= %=if (condition) {
// statements
} else {
// statements
}switch (value) {
case 1:
// code
break;
default:
// code
}for (int i = 0; i < 5; i++) {}
while (condition) {}
do {} while (condition);class Car {
String color;
void drive() {
System.out.println("Driving");
}
}
Car myCar = new Car();
myCar.drive();class Animal {
void eat() {}
}
class Dog extends Animal {
void bark() {}
}- Method Overloading
- Method Overriding
abstract class Shape {
abstract void draw();
}private String name;
public String getName() {}
public void setName(String name) {}interface Animal {
void eat();
}try {
// code
} catch (Exception e) {
System.out.println(e.getMessage());
} finally {
// always runs
}class MyThread extends Thread {
public void run() {}
}
MyThread t1 = new MyThread();
t1.start();ArrayList<String> list = new ArrayList<>();
list.add("Apple");HashSet<String> set = new HashSet<>();HashMap<Integer, String> map = new HashMap<>();Runnable r = () -> System.out.println("Running");
r.run();List<String> names = Arrays.asList("John", "Jane");
names.stream().forEach(System.out::println);BufferedReader reader = new BufferedReader(new FileReader("file.txt"));BufferedWriter writer = new BufferedWriter(new FileWriter("output.txt"));Connection con = DriverManager.getConnection(url, user, password);
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM users");β
Hello World β Understand JVM, JDK, JRE
β
Simple Calculator App β Basic OOP, operators
β
Tic Tac Toe CLI Game β Control flow, Arrays
β
Banking System β Classes, Encapsulation
β
Address Book App β File I/O
β
Multi-threaded Downloader β Multithreading
β
Employee Management System β JDBC, Database
β
Mini Web App with Spring Boot β Advanced Java + Web
β
OOP Principles
β
Collections (List, Set, Map)
β
Exception Handling
β
Threads & Concurrency
β
String Handling
β
File I/O
β
Java 8 Features (Streams, Lambdas)
β
JVM Internals
β
Garbage Collection
β
Design Patterns (Singleton, Factory, Observer, etc.)
β
SOLID Principles
β
Data Structures
β
Algorithms
β
System Design Basics
β
Java Installation & Setup
β
Hello World
β
Basic Syntax
β
Variables & Data Types
β
Control Flow (if, loops)
β
Methods
β
Classes & Objects
β
Constructors
β
Encapsulation
β
Inheritance
β
Polymorphism
β
Abstraction
β
Interface
β
ArrayList
β
LinkedList
β
HashSet
β
TreeSet
β
HashMap
β
TreeMap
β
Exception Handling
β
Multithreading
β
Streams API
β
Lambda Expressions
β
File I/O
β
JDBC
β
Maven
β
Gradle
β
Spring Boot
β
Hibernate
β
CLI Apps
β
Desktop Apps
β
Web Apps (with Spring Boot)
β
APIs (RESTful services)