https://www.linkedin.com/learning/learning-java-4/downloading-java-on-your-computer
Intro
Data Types
- Java classifies different pieces of data with data types based on their value.
- A data type provides a set of possible values.
- If a piece of data is one of a data type’s values, it is classified as that data type.
- Primitive Types are the foundation for all other data types within the Java programming language.
- Boolean: represents a true or false value (for example, is a light on or off?)
- Int: represents a whole number (for example, number of siblings)
- Double: represents a decimal number (for example, your GPA)
- Char: represents a single letter or symbol (for example, your first initial)
- Reference Types
- String: a sequence of ordered characters (for example, a word or person’s name)
Control Flow
- A program’s control flow is the order in which the program’s instructions or code statements are executed.
- All of the programs we’ve looked at so far execute one statement after another, sequentially.
- Here is where explanations or definitions can go; try and keep each built two or three lines max.
- We can manipulate which line of code is executed with special control flow statements and conditions.
- A line of code might never be executed, be executed once, or multiple times.
- The conditions determine how many times a given line of code is executed.
Scope with an If-Else Statement