Split Temporary Variable

You have a temporary variable assigned to more than once, but is not a loop variable nor a collecting temporary variable.

Make a separate temporary variable for each assignment.

  double temp = 2 * (_height + _width);
  System.out.println (temp);
  temp = _height * _width;
  System.out.println (temp);

image/svg+xml

  final double perimeter = 2 * (_height + _width);
  System.out.println (perimeter);
  final double area = _height * _width;
  System.out.println (area);