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 320 of 398Java Variable Declaration vs Initialization
Understand the difference between declaring and initializing Java variables, including default field values, local definite-assignment rules, final fields, and var.
Java Local Variable Scope and Rules
Understand Java local variables: scope, lifetime, shadowing, effectively final rules, and var usage with practical code examples.
Java Variable Initialization: Rules and Defaults
Java applies different initialization rules to fields, local variables, static members, and final variables. This article covers default values, definite assignment, initialization order, and common pitfalls.
Java Variable Declaration: Syntax, Scope, and var
Learn how Java variable declaration works: syntax, initialization, scope, final variables, and local variable type inference with var.
C# using vs Dispose: When to Use Each
Understand the difference between C#'s using statement and calling Dispose directly, with practical guidance for IDisposable cleanup and exception safety.
C# Dispose vs Destructor: Key Differences Explained
Dispose runs when you call it; a destructor runs later on the finalizer thread. The Dispose(bool) pattern, double-dispose guards, and when to skip one.
C# Lambda Default Parameters: Syntax and Limits
Learn how to use default values in C# lambda expressions: C# 12 syntax, compile-time rules, call-site behavior, and workarounds for older versions.
C# Primary Constructors for Classes: Syntax and Usage
C# primary constructors for classes: syntax, parameter capture, dependency injection examples, and the limits to check before replacing a constructor.
C# Reflection: Get Attributes from Types and Members
Learn how to use C# reflection to retrieve custom attributes from types and members, including inheritance behavior and performance considerations.
C# IComparer: Custom Sorting with IComparer<T>
Learn IComparer<T> in C# with a working example: custom sort order for Array.Sort and List<T>.Sort, null-safe Compare rules, and reuse tips.