Java basics
Start with variables, conditions, loops, and objects.
Variables have types
A type describes which values a variable can hold. Prefer clear names that explain the role of a value.
int completedLessons = 3;
String learnerName = "Ada";
boolean ready = completedLessons > 0;Conditions choose a branch
An if statement runs its body when the condition is true. Braces make the scope explicit.
if (completedLessons >= 3) {
System.out.println("Keep going!");
}Objects group behavior and data
A class describes a kind of object. A constructor initializes it, fields hold its state, and methods expose operations.
Try it yourself
Create a Note class with a title. Construct two notes and print their titles.


