Programming · Daily chapter

☕ Java

20 chapters · Notes, runnable code and practice

Day
01
Introduction to Java
What Java is, why it is popular, how the JVM works, and how to run your first Java program.
›
Day
02
Variables in Java
Declare, initialize and use variables in Java. Primitive types, default values and variable scope.
›
Day
03
Identifiers & Keywords in Java
Rules for naming identifiers, list of reserved keywords, and Java naming conventions.
›
Day
04
Data Types in Java
Primitive vs reference types, sizes, defaults, and type casting rules in Java.
›
Day
05
Operators in Java
Arithmetic, relational, logical, assignment, bitwise and ternary operators — with precedence rules.
›
Day
06
Conditional Statements in Java
if, if-else, else-if ladder, nested if, and switch statements in Java.
›
Day
07
Loops in Java
for, while, do-while and enhanced for-each loops with break and continue.
›
Day
08
Arrays in Java
Declare, initialize and access single-dimensional and 2D arrays in Java.
›
Day
09
Methods in Java
Define, call and overload methods. Parameters, return types and scope.
›
Day
10
Class & Object in Java
Define a class, create objects, use constructors and access instance members — the heart of OOP.
›
Day
11
Strings in Java
Work with text using String methods, compare strings the right way, and build text efficiently with StringBuilder.
›
Day
12
Constructors in Java
Go deeper into constructors: your own no-arg constructor, overloading, chaining with this(), copy constructors and validation.
›
Day
13
static and final in Java
Use static for data and methods that belong to the whole class, and final for values, methods and classes that must not change.
›
Day
14
Inheritance in Java
Reuse code by building a child class on top of a parent class with extends, call the parent with super, and override methods.
›
Day
15
Polymorphism in Java
One name, many forms: compile-time polymorphism with overloading, run-time polymorphism with overriding, upcasting and dynamic method dispatch.
›
Day
16
Abstract Classes and Interfaces in Java
Use abstract classes and interfaces to say what a class must do while leaving how it does it to the subclasses.
›
Day
17
Encapsulation and Access Modifiers in Java
Protect an object's data with private fields, getters and setters, and control who can see what with access modifiers and packages.
›
Day
18
Exception Handling in Java
Stop programs from crashing on bad input: try, catch and finally, checked vs unchecked exceptions, throw, throws and your own exception classes.
›
Day
19
Recursion in Java
Write methods that call themselves: base case and recursive case, factorial, Fibonacci, the call stack and StackOverflowError.
›
Day
20
ArrayList and Collections in Java
Store data in lists that grow as needed with ArrayList, sort them with Collections, and look values up by key with HashMap.
›