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:
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:
Chapter8: Arrays
Section: Chapter Questions
Problem 9PE
Related questions
Question
java
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
Knowledge Booster
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.Recommended textbooks for you
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,