menu
QAmmunity.org
Login
Register
My account
Edit my Profile
Private messages
My favorites
Ask a Question
Questions
Unanswered
Tags
Categories
Ask a Question
What is output by the code below? int[] nums = new int[10]; for (int i=0; i < nums.length; i++) { nums[i] = i*2; } System.out.println(nums[5]); a.16 b. 10 c. 14 d. 18 e. 12
asked
Apr 18, 2021
139k
views
3
votes
What is output by the code below?
int[] nums = new int[10];
for (int i=0; i < nums.length; i++)
{
nums[i] = i*2;
}
System.out.println(nums[5]);
a.16
b. 10
c. 14
d. 18
e. 12
Computers and Technology
high-school
Derric
asked
by
Derric
8.6k
points
answer
comment
share this
share
0 Comments
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
4
votes
Answer: I think it is a
Explanation:Sorry if it it is worng
Gskalinskii
answered
Apr 22, 2021
by
Gskalinskii
8.1k
points
ask related question
comment
share this
0 Comments
Please
log in
or
register
to add a comment.
← Prev Question
Next Question →
Related questions
asked
Nov 25, 2024
87.3k
views
What will print out when the following code executes? int[] nums = {1, 2, 3, 4, 5, 6}; int count = 0; while (nums[count] % 2 != 0) nums[count+1] ++; count++; System.out.println(count); 0 0 1 02 03 05
Christan
asked
Nov 25, 2024
by
Christan
8.6k
points
Engineering
college
1
answer
2
votes
87.3k
views
asked
Feb 27, 2018
147k
views
Consider the following methods: public static double average(int nums[]) { int sum =0; for (int i = 0; i < nums.length; i++) { sum += nums[i]; } return (1.0 * sum) / nums.length; } //average public static int[] mystery(String a[]) { int temp [] = new int[a.length]; for (int i = 0; i < a.length; i++) { temp[i] = a[i].length(); } return temp; } //mystery What is output by running the following? String spelling[] = {"against", "forms", "belief", "government", "democratic", "movement", "understanding", "single", "followed", "scenario"}; System.out.println( average( mystery(spelling))); 1. 10 2. 8.5 3. 8.1 4. Error, you cannot average Strings. 5. 8
Rani
asked
Feb 27, 2018
by
Rani
7.6k
points
Computers and Technology
high-school
1
answer
4
votes
147k
views
asked
Dec 7, 2022
57.6k
views
Please help me :) Consider the program segment below. Assume k is a positive number. for (int i = 2; i <= k; i++) if (nums[i] < someValue) System.out.println("FOUND"); What is the maximum number of times FOUND can be printed? Group of answer choices k - 1 1 0 k k - 2
Gerasalus
asked
Dec 7, 2022
by
Gerasalus
8.4k
points
Computers and Technology
college
1
answer
2
votes
57.6k
views
Ask a Question
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.
9.5m
questions
12.2m
answers
Other Questions
“What does it mean when we “rework” copyrighted material?”
Seven basic internal components found in a computer tower
Please help me ! All you do is just put it it all in your own words ! Please this is for my reported card!i don't know how to put it in my own words because my English is not that good!
describe an advance in technology that makes life more enjoyable. what discoveries contribute to this technology?
Disadvantages of using animation in advertising? advantages and disadvantages of using animation for education? advantages and disadvantages of using animation in entertainment?
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy
Search QAmmunity.org