Can you help me with this program? In Java! Define a two-dimensional array of names. For each row: • specify the name with the longest length • check for a name starting with "A" (save its index) Save the results in one-dimensional arrays (initialize all elements of the second result array with -1 initially). Display an array of names, the names with the longest length of each line, and the name starting with "A" from each line or a message that there is none.
Can you help me with this program? In Java! Define a two-dimensional array of names. For each row: • specify the name with the longest length • check for a name starting with "A" (save its index) Save the results in one-dimensional arrays (initialize all elements of the second result array with -1 initially). Display an array of names, the names with the longest length of each line, and the name starting with "A" from each line or a message that there is none.
Chapter9: Advanced Array Concepts
Section: Chapter Questions
Problem 9RQ
Related questions
Question
Can you help me with this program?
In Java!
Define a two-dimensional array of names.
For each row:
• specify the name with the longest length
• check for a name starting with "A" (save its index)
Save the results in one-dimensional arrays (initialize all elements of the second result array with -1 initially).
Display an array of names, the names with the longest length of each line, and the name starting with "A" from each line or a message that there is none.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 1 images
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
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT