- 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)