QUESTION 25 Assume namesList is an array of type String that is already declared and initialized with some names. Fill in the missing code for the following code snippet to set the variable len to the total number of characters in the array namesList for the names that have more than 4 characters. If the array size is more that 7 then the value of len will be 0. for Example if namesList contains "jupiter", "sun", "moon", "ven" then the value of len would be 7. 1. /* Assume nameslist is an array already declared and initialized with some names 2. 3. */ 4. int len - 0; 5. if ( 6. { < 8 ) for (int i = 0; i < { ; i++) 7. 8. 9. if ( _> 4 ) 10. 11. //Code to add the number of character to len 12. } 13. } Missing code in line 5: Missing code in line 7: Missing code in line 9:

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter8: Arrays
Section: Chapter Questions
Problem 9PE
icon
Related questions
Question

java

QUESTION 25
Assume namesList is an array of type String that
missing code for the following code snippet to set the variable len to the total number of characters in the array
namesList for the names that have more than 4 characters. If the array size is more that 7 then the value of len will
be 0.
already declared and initialized with some names. Fill in the
for Example if namesList contains "jupiter", "sun", "moon", "ven" then the value of len would be 7.
1. /* Assume nameslist is an array already declared and
2.
initialized with some names
3. */
4. int len = 0;
5.
if (
< 8 )
6. {
; i+t)
for (int i = 0; i <
{
8.
9.
if (
> 4 )
10.
11.
//Code to add the number of character to len
12.
}
13. }
Missing code in line 5:
Missing code in line 7:
Missing code in line 9:
Transcribed Image Text:QUESTION 25 Assume namesList is an array of type String that missing code for the following code snippet to set the variable len to the total number of characters in the array namesList for the names that have more than 4 characters. If the array size is more that 7 then the value of len will be 0. already declared and initialized with some names. Fill in the for Example if namesList contains "jupiter", "sun", "moon", "ven" then the value of len would be 7. 1. /* Assume nameslist is an array already declared and 2. initialized with some names 3. */ 4. int len = 0; 5. if ( < 8 ) 6. { ; i+t) for (int i = 0; i < { 8. 9. if ( > 4 ) 10. 11. //Code to add the number of character to len 12. } 13. } Missing code in line 5: Missing code in line 7: Missing code in line 9:
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Introduction to computer system
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,