Lesson 12: If-Statements
Thus far, we have been building some basic programs. However, the further we delve into Java, the more we find that in order to build more extensive programs, that we will need to start implementing conditional statements. The best way to describe the usage of conditional statements is that they are statements that are only…
Lesson 13: If Else Statements
In the last lesson we were introduced to if statements and how they are implemented in Java. In this lesson, we will be going over a more advanced version of the if statement. This statement will be referred to as the if else statement. This applies everything we learned in the lesson prior and adds…
Lesson 14: Else If Statements
Last lesson we learned about if else statements and how to get the computer to execute an else statement when the condition within our if statement is not met. In this lesson, we will be going over how to create an else if statement that is linked to the if else statement we learned the…
Lessons 15: Comments
As you become more of a proficient programmer and start to create larger more complex programs, you will find out how important it is to organize your code and be able to quickly identify what your code is doing. Fortunately, Java has a way to write comments within our code that we can write to…
Coding Challenge 4:
For this coding challenge, we are going to create a class called CodingChallenge4 and create a boolean variable called I_like_sushi . You can assign it either a true or false value based on whether you are a Sushi fan. Then, we are going to create an if and an else if statement. For the if…