Question: Write a method countEvens that takes an ArrayList of String objects as input and returns the number of even length strings contained in the input.

 Write a method countEvens that takes an ArrayList of String objects

Write a method countEvens that takes an ArrayList of String objects as input and returns the number of even length strings contained in the input. For example, if the input is ["one", "peach", "pear", "plum"] then countEvents(inp) should return 2. 2b) Write a method, mirror, that doubles the size of a list of integers by appending a mirror image of the list. For example, given an array list containing [1,5,2,6], the method should return an array list containing [1,5, 2, 6, 6, 2, 5, 1]. Use the ArrayList data structure to represent the input and output of this method

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!