Question: Complete the Words class. The Words class has a constructor that takes an array of Strings as a parameter. Provide the instance variable and the

Complete the Words class. The Words class has a constructor that takes an array of Strings as a parameter.

Provide the instance variable and the constructor.

Provide a method Seconds() which returns a string consisting of the second character of each string in the array separated by "*". That is an asterisk. You can assume that the array is not empty and each element has at least 2 character.

I'm stuck on this step, this is my code so far

public class Words { private String[] array; public Words() { this.array = array; } public String Seconds() { String seconds = ""; for (int a = 0; a < array.length; a++) { seconds = } return seconds; } }

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!