All syntax guides
Short, practical guides on programming syntax, language fundamentals, and the tools developers reach for every day.
3,980 guides across 14 topics
Topics
Popular guides
Most readLatest guides
Page 319 of 398Java final vs static: What Each Keyword Controls
java final vs static: Understand the difference between Java's final and static keywords, how they combine into constants, and when to use each in real code.
Java Final Variable Initialization Rules
java final variable initialization: Understand the rules for initializing final variables in Java—blank finals, compile-time constants, and common initialization errors.
Java Final Keyword: Usage and Behavior
How Java's final keyword works on variables, methods, and classes: reassignment errors, blank final fields, and final references versus immutable objects.
Java Final Variable: Syntax, Behavior, and Use Cases
Java final in practice: single assignment, blank final fields, effectively-final lambdas, and why a final reference is still mutable.
Java Variable Shadowing Explained
java variable shadowing: Understand Java variable shadowing: how local variables and parameters can hide fields, the pitfalls, and how to avoid confusion.
Java Variable Scope: Rules and Examples
java variable scope: Understand Java variable scope: block scope, shadowing, lifetime, and how local variables, fields, and parameters behave in practice.
Instance vs Static Variables in Java: Key Differences
Understand the difference between instance and static variables in Java, including memory, lifecycle, and when to use each.
Java Local vs Instance Variable: Key Differences
Learn how local and instance variables in Java differ in scope, lifetime, initialization, memory behavior, and thread safety, with code examples of common pitfalls.
Understanding Java Static Variables
Explore Java static variables: their syntax, memory model, usage in constants and counters, thread-safety implications, and best practices.
Java Instance Variable Explained
Learn what a Java instance variable is, how it stores object state, and how to use it correctly with initialization, access, and scope rules.