Joe J.

asked • 10/26/22

The following should print "ver" and "ever". Write the methods that will make the program work.

public static void main (String[] argv) {

char[] word = {'n', 'e', 'v', 'e', 'r'};

char[] word2 = {'r','i', 'v', 'e', 'r'};

char[] word3 = {'e', 'v', 'e', 'r'};

char[] suffix = commonSuffix (word, word2);

printArray (suffix);

suffix = commonSuffix (word, word3);

printArray (suffix);

}

1 Expert Answer

By:

Karl P. answered • 10/31/22

Tutor
4.8 (370)

BS in Computer Science

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.