The output of this Java program will be:
Consider the class below:
```
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 location of virtual hard disks and virtual machines can be changed using Hyper-V Manager Server settings.
Answer the following statement true (T) or false (F)
The cost performance index and schedule performance index are calculated by creating a ratio from two other earned value indicator fields.
Answer the following statement true (T) or false (F)
The SmartArt ________ pane displays an outline view for typing text items that are then placed in the SmartArt diagram
Fill in the blank(s) with correct word
When an IPv6 computer joins a network, it sends out multicast ____________________ packets searching for other computers on its broadcast domain.
Fill in the blank(s) with the appropriate word(s).