2D Shapes(Objects) Properties Stroke
This property is of the type Paint and it represents the color of the boundary line of the shape. You can set a value to this property using the method setStroke() as shown below −
By default, the color of the stroke is black. Following is a diagram of a triangle with different stroke colors.