Write a method called longestName that accepts a Scanner for the console and an integer n as parameters and prompts for n names, then prints the longest name (the name that contains the most...



Write a method called longestName that accepts a Scanner for the


console and an integer n as parameters and prompts for n names, then


prints the longest name (the name that contains the most characters) in


the format shown below, which might result from a call of


longestName(console, 4):


name #1? Roy


name #2? DANE


name #3? sTeFaNiE


name #4? Mariana


Stefanie's name is longest



May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here