+ 6
Fill in the blanks to calculate the sum of all elements in the array "arr" using an enhanced for loop:
int res = 0; for (int el arr) { res += ; }
10 Antworten
+ 10
int res = 0;
for(int el:arr) {
res +=el;
}
+ 4
int res = 0;
for(int el:arr)
{
res +=el;
}
+ 1
Fill in the blanks to print the elements of the array using the foreach loop.
0
int res=0;
for(int el:arr){
res+=el;
}
0
int res = 0;
for(int el:arr) {
res +=el;
}
0
int res = 0;
for (int el:arr) {
res += el;}
0
int res=0;
for(int el:arr){
res+=el;
}
0
for
:
el
0
Fill in the blanks to call the method "hello" from main:
public static void main(String[ ] args) {
;
}
static void hello() {
System.out.println("hi");
}
Check
Back
- 8
I like cheese