Which of the following code displays the area of a circle if the radius is positive.

a. if (radius != 0) System.out.println(radius * radius * 3.14159);
b. if (radius >= 0) System.out.println(radius * radius * 3.14159);
c. if (radius > 0) System.out.println(radius * radius * 3.14159);
d. if (radius <= 0) System.out.println(radius * radius * 3.14159);


c. if (radius > 0) System.out.println(radius * radius * 3.14159);

Computer Science & Information Technology

You might also like to view...

The block of code that checks if an unusual situation or error occurs is called

a. the catch block b. the try block c. a function d. an error block

Computer Science & Information Technology

Which primitive type can hold the largest value?

a. int b. long c. float d. double

Computer Science & Information Technology

When a symbol can be formatted with such text features as Bold, Italics, and Font Color the symbol is a(n) ________

A) shape graphic B) picture graphic C) character graphic D) text graphic

Computer Science & Information Technology

When you save a template on your own computer to the default location, it will be available for future use from ________

A) My charts B) My templates C) My worksheets D) My workbooks

Computer Science & Information Technology