For the 8th Coding Challenge, we will make a program that has 2 methods. The first method will be a user-made method: static void makeCoffee
. This method will also have a parameter: boolean wantsCoffee
.
Within the user-made method, we will have an if statement that only executes when wantsCoffee
is true. The if statement (when true) should print the following: Your coffee is brewing
Inside of our main method, we will call the user made method and pass the value true to our method with an argument.
After compiling and running our code, the output should be:

Good luck and if you get stuck, scroll down to the bottom of the screen for help!
methods, parameters, arguments
methods, parameters, arguments
methods, parameters, arguments
methods, parameters, arguments
methods, parameters, arguments
methods, parameters, arguments
methods, parameters, arguments
methods, parameters, arguments
methods, parameters, arguments

Great job and see you next Chapter!
Leave a Reply