Write a public static void function named getLongestName. This function should be designed to take a String [] reference variable and use this to find the longest name in the array. Your function should then return this String. Make a call to this function in your main function passing it namesList at the actual parameter. Use the returned string so that you print out a meaningful message to the screen.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter8: Advanced Method Concepts
Section: Chapter Questions
Problem 8RQ
icon
Related questions
Question

Write a public static void function named getLongestName. This function should be designed to take a String [] reference variable and use this to find the longest name in the array. Your function should then return this String.
Make a call to this function in your main function passing it namesList at the actual parameter. Use the returned string so that you print out a meaningful message to the screen. 

Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Arrays
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
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,