logo CodeStepByStep logo

acronymFor

Language/Type: Java ArrayList
Related Links:

Write a method named acronymFor that accepts an ArrayList of strings as a parameter and returns an acronym from the elements in the list. You form an acronym by combining the capitalized first letter of each word in the list.

For example, the list [laughing, out, loud] produces the acronym "LOL". The list [Computer, Science, Engineering] produces the acronym "CSE". You may assume that all of the strings are nonempty. Do not modify the list passed in. If passed an empty list, your method should return an empty string.

Method: Write a Java method as described, not a complete program or class.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.