Paint paint = new Paint(); paint.setStyle(Paint.Style.FILL);
Paint paint = new Paint(); paint.setStyle(Paint.Style.STROKE); paint.setStrokeWidth(5);
Paint paint = new Paint(); paint.setStyle(Paint.Style.FILL_AND_STROKE); paint.setStrokeWidth(10);In these examples, we have created a new Paint object and set the style using the setStyle method to fill, stroke or fill and stroke. We have also specified the stroke width in the second and third examples. The package library used is android.graphics.