Analyze the following code:

```
public class Test {
public static void main(String[] args) {
int n = 10000 * 10000 * 10000;
System.out.println("n is " + n);
}
}
```
a. The program displays n is 1000000000000.
b. The result of 10000 * 10000 * 10000 is too large to be stored in an int variable n. This causes an overflow and the program is aborted.
c. The result of 10000 * 10000 * 10000 is too large to be stored in an int variable n. This causes an overflow and the program continues to execute because Java does not report errors on overflow.
d. The result of 10000 * 10000 * 10000 is too large to be stored in an int variable n. This causes an underflow and the program is aborted.
e. The result of 10000 * 10000 * 10000 is too large to be stored in an int variable n. This causes an underflow and the program continues to execute because Java does not report errors on underflow.

c. The result of 10000 * 10000 * 10000 is too large to be stored in an int variable n. This causes an overflow and the program continues to execute because Java does not report errors on overflow.

Computer Science & Information Technology

You might also like to view...

Windows 7 supports a maximum of 20 people accessing the same network share on a computer

Indicate whether the statement is true or false

Computer Science & Information Technology

The default Show As appointment status is ____.

A. Free B. Tentative C. Out of Office D. Busy

Computer Science & Information Technology