1.1-Introductie-Programmeren

Combining names

Difficulty: Filled Outlined Outlined

Create a program that allows you to enter a list of first names. The application will then spit out a list of ‘couples name’ that is generated based on the names in this list. The names are generated by splitting each name into two halves and combining the first half of one name with the second half of the other name. You should take a look at the official Java String documentation (especially the substring method!).

Note that you don’t have to match the “same name” (try matching Angelina with Angelina and think about the result).

Example

example