Variable names cannot contain certain special symbols, such as exclamation marks (!). Spaces are also not allowed, since they're used to separate parts of commands. Instead of spaces, the convention in Java is to use a style known as camelCase.

The Integer.valueOf command converts a string to an integer.

The Double.valueOf command converts a string to a double.

The Boolean.valueOf command converts a string to a boolean. When converting a string to a boolean, the string must be "true" if we want the boolean value to be true. The case is insensitive here: both "true" and "TRue" turn into the boolean value of true. All other strings turn into the boolean false.

An if -statement is not followed by a semicolon since the statement doesn't end after the conditional.

NetBeans will help you with indentation if you hit the "alt + shift + f" (macOS "control + shift + f") key combination.

On Execution order of Conditional Statements, demonstrated using FizzBuzz, One approach for developing this train of thought would be to first find the most demanding condition, and implement it. After that, we would implement the other conditions. In the example above, the condition "if the number is divisible by both three and five" requires two things to happen.

A loop consists of an expression that determines whether or not the code within the loop should be repeated, along with a block containing the source code to be repeated.

The variables that are commonly used in loops (such as Scanner readers) are defined before the loop, whereas variables (such as the value read from the user) that are specific to the loop are defined within it.

You can also return to the beginning from other places besides the end with the command continue. When the computer executes the command continue, the execution of the program moves to the beginning of the loop.

During the design and implementation of a program, it's desirable to aim for a situation in which every part of the program has a a single, clear task.

A for loop contains four parts: (1) introducing the variable for counting the number of executions; (2) the condition of the loop; (3) increasing (or decreasing or changing) the value of the counter variable; and (4) the functionality to be executed.

When you are writing a program, whether it's an exercise or a personal project, figure out the types of parts the program needs to function and proceed by implementing them one part at a time. Make sure to test the program right after implementing each part.

Never try solving the whole problem at once, because that makes running and testing the program in the middle of the problem-solving process difficult. Start with something easy that you know you can do. When one part works, you can move on to the next.

Technically speaking, a method is a named set of statements. It's a piece of a program that can be called from elsewhere in the code by the name given to the method.

Methods cannot be defined e.g. inside other methods.

The names of methods begin with a word written entirely with lower-case letters, and the rest of the words begin with an upper-case letter - this style of writing is known as camelCase. Additionally, the code inside methods is indented by four characters.

Parameters are values given to a method that can be used in its execution. The parameters of a method are defined on the uppermost line of the method within the parentheses following its name. The values of the parameters that the method can use are copied from the values given to the method when it is executed.

The definition of a method tells whether that method returns a value or not. If it does, the method definition has to include the type of the returned value. Otherwise the keyword void is used in the definition.

The environment that executes Java source code keeps track of the method being executed in the call stack. The call stack contains frames, each of which includes information about a specific method's internal variables and their values. When a method is called, a new frame containing its variables is created in the call stack. When the execution of a method ends, the frame relating to a method is removed from the call stack, which leads to execution resuming at the previous method of the stack.