Java cube

Java Draw Cylinder Cube Circle

There are no predefined methods to draw a cylinder, cube and circle. Using existing methods of Graphics class like drawOval(), drawRect(), drawArc() etc., the task can be done.

Here circle is drawn using drawOval() method. There are other ways to draw circle in Java. Other simple methods used are…