Question: In the class with the main() method, add a method called averageLength that takes any number of String parameters. The method should compute and return

In the class with the main() method, add a method called averageLength that takes any number of String parameters. The method should compute and return the average length of the strings as a double. If no strings are passed to the method, it should return 0. you need be able to complete the method using only a single Java statement.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!