The output of this Java program will be:
```
public class Test {
public static void main(String[] args) {
int[] a = {99, 22, 11, 3, 11, 55, 44, 88, 2, -3};
int result = 0;
for (int i = 0; i < a.length; i++) {
if (a[i] > 30) {
result += a[i];
}
}
System.out.printf("Result is: %d%n", result);
}
}
```
a. Result is: 280.
b. Result is: 286.
c. Result is: 154.
d. Result is: 332.
b. Result is: 286.
You might also like to view...
The _________ keyword is used to define methods within a MustInherit class that must be implemented in a derived class for that derived class to be concrete.
a) Overridable b) Abstract c) MustOverride d) MustImplement.
When using File Explorer, ________ indicate that the current path is too long to fit in the address bar
A) double chevrons (<<) B) double forward slashes (/ /) C) double backslashes (\) D) ellipses (...)
Which of the following is not fault tolerant?
a. RAID Level 0 b. RAID Level 1 c. RAID-5 d. None of the above.
____ is the process of using either ISL or 802.1q to allow multiple VLAN traffic on the same link.
A. Trunking B. Access list C. Forwarding D. Pruning