For our 5th coding challenge, we are going to be working with arrays!
To start off, we are going to create two separate String arrays. Our first array will be named
firstName and our second array will be named
In our first array, we will put the first names of our favorite three actors, putting your favorite first, then your second favorite actor, and your least favorite actor, lastly.
Now, repeat the same steps for the
lastName array, but instead of putting the first names, put your favorite actor’s last names.
Now, you should have 2 arrays: 1 array with your favorite actor’s first names and another array with their last names.
For the output of our program, I want it to look like the following (except it will be your favorite actors):
Use your newly acquired knowledge of arrays to print out a statement with your favorite actors listed. If you get stuck, you can scroll down for help.
Awesome job! You should now have a basic understanding of how arrays and their indexes work.