For this challenge, we are going to construct a class called CodingChallenge2
and use the print method that prints something like the following:
My favorite color starts with the letter G and I am 18 years old.
Instead of creating one large String, we are going to use the addition symbol to join the following variables:
- 3 Strings to build the sentence.
- 1 char to print the letter of the favorite color
- 1 int that will be used to print the age
You can name the variables whatever you want, just try to remember that we want the names of our variables to be intuitive and short. If you get stuck, feel free to look at the picture below! Good luck and have fun!

Good job! You are really starting to get the hang of it! If you had any issues with the challenge, feel free, to look back over the lessons to review. Otherwise, on to the next topic!
Leave a Reply