Solved

Consider the Class Below

Question 1

Multiple Choice

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) ;
}
}
The output of this Java program will be:


A) Result is: 280.
B) Result is: 286.
C) Result is: 154.
D) Result is: 332.

Correct Answer:

verifed

Verified

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents