Back to all rules
What this rule checks
Local variable names follow lowerCamelCase
Configuration
When off, this rule is excluded from pipeline runs. Changes apply immediately.
Code Examples
PASS — this code satisfies the rule
void setup() {
  size(400, 400);
}

void draw() {
  background(255);
  float ballSize = mouseX / 4;
  ellipse(200, 200, ballSize, ballSize);
}
FAIL — this code triggers the rule
void setup() {
  size(400, 400);
}

void draw() {
  background(255);
  float BallSize = mouseX / 4;  // should start lowercase: ballSize
  ellipse(200, 200, BallSize, BallSize);
}
Overview
Category Topic Variables
Level Intermediate
Type Built-in PMD
Priority 3 (1 = highest, 5 = lowest)
Status Active
PMD Configuration
PMD reference category/java/codestyle.xml/LocalVariableNamingConventions