Java is a statically typed language. Every variable must declare its type before you can use it. If you skip the type, your code won't compile.
A declaration follows this pattern:
type name = value;
You can also declare without assigning right away:
int age;
age = 25;
Once you declare age as int, it can only hold whole numbers. Trying to assign "hello" to it causes a compile error. This strictness catches bugs early. In dynamically typed languages like Python, a variable can hold any type at any time, which means type errors only surface when your code runs.