Write a method called longestName that accepts a Scanner for the console and an integer as parameters
Question:
Write a method called longestName that accepts a Scanner for the console and an integer as parameters and prompts for 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
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Building Java Programs A Back To Basics Approach
ISBN: 9780135471944
5th Edition
Authors: Stuart Reges, Marty Stepp
Question Posted: