An alternative approach for filling an area is to start at a point inside the area and “paint” the interior, point by point, out to the boundary. This is a particularly useful technique for filling areas with irregular borders, such as a design created with a paint program.
- jdk 1.8 or higher
- $
javac AreaFill.java - $
java AreaFill