Back to Intellij Community

ReassignedVariable

java/java-impl/resources/inspectionDescriptions/ReassignedVariable.html

2025.3-rc-2247 B
Original Source

Reports reassigned variables, which complicate reading and understanding the code.

Example:

int value = 2 * (height + width);
  System.out.println("perimeter: " + value);

  value = height * width;
  System.out.println("area: " + value);