Java Language Oracle Official Code Standard Variable Declarations

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

  • One variable per declaration (and at most one declaration per line)
  • Square brackets of arrays should be at the type (String[] args) and not on the variable (String args[]).
  • Declare a local variable right before it is first used, and initialize it as close to the declaration as possible.


Got any Java Language Question?