Which of the following statements terminates a program prematurely?
a. terminate( 0 );
b. exit( 1 );
c. end( 0 );
d. eof();
b. exit( 1 );
You might also like to view...
Which Case clause will be true whenever the value of the selector in a Select Case block is greater than or equal to 7?
(A) Case Is >7 (B) Case Is = 8 (C) Case Is >= 7 (D) Case Is <=
The following program draws squares recursively. Fill in the missing code.
``` import javax.swing.*; import java.awt.*; public class Test extends JApplet { public Test() { add(new SquarePanel()); } static class SquarePanel extends JPanel { public void paintComponent(Graphics g) { super.paintComponent(g); int width = (int)(Math.min(getWidth(), getHeight()) * 0.4); int centerx = getWidth() / 2; int centery = getHeight() / 2; displaySquares(g, width, centerx, centery); } private static void displaySquares(Graphics g, int width, int centerx, int centery) { if (width >= 20) { g.drawRect(centerx - width, centery - width, 2* width, 2 * width); displaySquares(_________, width - 20, centerx, centery); } } } }``` a. getGraphics() b. newGraphics() c. null d. g