employer cover photo
employer logo

VMware Interview Question

Write code to draw a circle.

Interview Answers

Anonymous

Apr 15, 2015

Use recursion to split the draw circle into half in each call until the size reaches threshold to draw an arc. Duplicate the arc post recursion.

1

Anonymous

Jul 2, 2015

public class DrawCircle extends Frame { public void paint(Graphics g) { Graphics2D ga = (Graphics2D) g; ga.setPaint(Color.red); ga.drawOval(300,300,200,200); } public static void main (String args[]) { DrawCircle frame = new DrawCircle(); frame.addWindowListener( new WindowAdapter() { public void windowClosing(WindowEvent we) { System.exit(0); } } ); frame.setSize(800, 800); frame.setVisible(true); } }

Anonymous

Jan 17, 2021

There's quite an extended back and forth in actual interviews for questions like this, so nothing quite like real practice. The Prepfully VMware Staff Engineer experts have actually worked in this role, so they're able to do an honest-to-God accurate mock, which really puts you through the paces. prepfully.com/practice-interviews