Does the return statement in the following method cause compile errors?

```
public static void main(String[] args) {
int max = 0;
if (max != 0)
System.out.println(max);
else
return;
}
```
a. Yes
b. No


b. No
It is rare, but sometimes useful to have a return statement for circumventing the normal flow of control in a void method.

Computer Science & Information Technology

You might also like to view...

What is free software? List three characteristics of free software.

What will be an ideal response?

Computer Science & Information Technology

The ________ Wizard restricts how data is entered into a field

Fill in the blank(s) with correct word

Computer Science & Information Technology

The ____ button in the Resource Information dialog box lets you access a sever for the resource.

A. Collaborate B. Project Server C. Windows Account D. Share Information

Computer Science & Information Technology

A system that hides the activities of high-privilege users from low-privilege users employs the model known as:

a. Non-interference b. Compartmented c. Access matrix d. Biba

Computer Science & Information Technology