1.1-Introductie-Programmeren

A list of names

Difficulty: Filled Filled Outlined

Create a program in which you’ll hardcode 10 names into an ArrayList (with type String). Then show some basic information about this list on the screen.

Finally, create a method getRandomName that will select a random name from that list.

Examples

List of names: “John”, “Steve”, “Jack”, “Jill”, “Tina”, “Ethan”, “Doug”, “Greg”, “Phillip”, “Joann”

Example