Key Sections

  1. Output in Java
  2. User Input and Variables
  3. Data Types
  4. Number Calculations
  5. Modular Division

1. Output in Java

<aside> <img src="/icons/pencil_gray.svg" alt="/icons/pencil_gray.svg" width="40px" />

This will primarily teach you the function of System.out.println(); which is used to output text that you put within the parenthesis as well as separate the text by line. In the case that you do not want to separate the text by line, you can also use the System.out.print(); method.

</aside>

1 | System.out.println("Hello World");
2 | System.out.print("What's Up World");

You’ll notice that the difference between these two methods is that one has the ln morphematical addition whereas the other does not. That’s because the function of the ‘LN[ln]’ is to provide a new line character immediately after the end of the output.

<aside> <img src="/icons/pencil_gray.svg" alt="/icons/pencil_gray.svg" width="40px" />

Next we will encounter the STRING data type. The directions that we give to the computer in computer science are called commands.

  1. Algorithms
    1. Define step-by-step processes to follow when completing a test or solving a problem.
    2. Can be represented using written language, diagrams, or programming languages.
  2. Sequencing
    1. Defines the order in which steps in a process are completed.
    2. Steps in a process are completed one at a time.
    3. Building blocks of algorithms are sequencing, selection, and iteration.
  3. Commands
    1. Order of the commands will make the difference - be specific.
    2. Commands to the computer must be exact or it will compile an error.
  4. Integrated Development Environment (IDE)
    1. Code can be written in literally any text editor so no worries there however…
    2. Using an IDE can be helpful to 1. write, 2. compile, and 3. run code.
    3. Feel free to use VSCode or any other platform to assist or serve as an IDE.
  5. Class
    1. Container for all of our programs.
    2. Blueprint the defines the characteristics of an object.
    3. Class title should match the name of the file you’re working with (Project STEM)

RUNNING CODE IS A 2-STEP PROCESS

You may be wondering what the importance of the “__” is in Java. Quotes do not actually output quotes, there are special ways you can print quotes that you’ll learn in Unit 2. With the System.out.print method the quotes allow the computer to compile and output what is known as a string literal; this means that within the quotes you can put any text or combination of symbols and the compiler will output exactly what was put inside.


</aside>


2. User Input and Variables