Several classes are provided in the Java 2D API that defines common geometric object like: PointsLinesCurvesRectangles
These geometry classes are part of the java.awt.geom package.
To retrieve methods from the path, the PathIterator interface defines and provides methods. For describing and inspecting geometric path objects, the Shape interface provides a set of methods. The GeneralPath class implements this interface and other geometry classes.
Following set of the standard shapes are provided by the Java 2D API. PointsEllipsesRectanglesLinesArcsCurves
To define geometric primitives, package java.awt.geom is considered to be the important one. By integration as well as the combination of straight geometric primitives, you can present arbitrary shapes.
Shape interface which consists of an outline & interior, presents the geometric shape. These set of methods are provided by this interface.