Skip to content

Commit b17eecb

Browse files
committed
Fixed things
Moved arrays after if else
1 parent 8efcdba commit b17eecb

5 files changed

Lines changed: 23 additions & 21 deletions

File tree

readme.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ Roadmap:
1919
2. Variables \[🎉\]
2020
3. Mathematical Operators \[🎉\]
2121
4. Boolean & Equality Operators \[🎉\]
22-
5. Arrays \[🎉\]
23-
6. Control Flow \[🎉\]
24-
7. If Else \[🎉\]
22+
5. Control Flow \[🎉\]
23+
6. If Else \[🎉\]
24+
7. Arrays \[🎉\]
2525
8. Loops \[🎉\]
2626
9. Functions \[🎉\]
2727
2. Object-Oriented Programming \[🚧\]
@@ -47,7 +47,7 @@ Roadmap:
4747
11. Robot Interfacing (Driver Station)
4848
5. Advanced Java (ALL need refining)\[\]
4949
1. Inheritance (ext resource) \[🚧\]
50-
2. Advanced String Usage \[\]
50+
2. Advanced String Usage \[\]
5151
3. Arraylist \[✔️\]
5252
4. Hashmap \[✔️\]
5353
5. Hashset \[✔️\]

src/Java-Fundamentals/course/Basic-Syntax.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ public class Main {
1515
Let's go through this line by line:
1616

1717
1. `public class Main { [...] }`
18-
- In Java, every file contains one main *class* that has the same name as the file its in (in this case the above file would be called `Main.java`). We’ll talk about [classes](../../Object-Oriented-Programming/course/Classes.md) more in the future, but for now think of them as a container for parts of our code. Code between the opening and closing curly parenthesis is considered "part" of that class.
18+
- You don't have to worry about this but in Java, every file contains one main *class* that has the same name as the file its in (in this case the above file would be called `Main.java`). We’ll talk about [classes](../../Object-Oriented-Programming/course/Classes.md) more in the future, but for now think of them as a *container* for parts of our code. Code between the opening and closing curly parenthesis is considered "part" of that class.
1919
2. `public static void main(String[] args) { [...] }`
20-
- This is the *main method* Every application in Java contains a main method. When we run our program, the java compiler starts running our code from here.
20+
- This is the *main method* Every application in Java contains a main method. When we run our program, the java compiler *starts running our code from here*.
2121
3. `System.out.println("hello World");`
2222
- This is known as a **print statement**. It prints the text "Hello, World!" to standard output (your screen). The text inside the quotation marks is called a [String](./Variables.md#) in Java. We use `System.out.println(" [...]
2323
")` to print the text inside the double quotes to the screen.

src/Java-Fundamentals/course/Control-Flow.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
# Control Flow
2-
Control flow is the way a program decides what to do and when. Generally, code is executed top to bottom, in the order of appearance, but control flow statements allows for branching and conditionally-executed code. can be modified using `functions`, `loops`, `if` / `else` statements, `jump` statements, and `try`/ `catch` blocks.
2+
Control flow is the way a program decides what to do and when. Generally, *code is executed top to bottom*, in the order of appearance, but control flow statements allows for branching and conditionally-executed code. This can be done using `functions`, `loops`, `if` / `else` statements, `jump` statements, and `try`/ `catch` blocks. We will learn about a few of these later but for no here is an overview of what each is before we start learning about them.
33

44
<hr>
55

66
# Terminology
77

8-
**Functions** : Allow for repeated portions of code to be executed differently each time based on a parameter
9-
>`System.out.println("HELLO")` is a function that changes its execution based on the parameter passed, the string. We'll cover these more in depth later.
8+
The following is stuff we haven't learned yet but will later!
109

11-
**Loops** : Repeats a block of code several times, either in iteration, or while a condition is true.
10+
- [**Functions**](./Functions.md) : Allow for repeated portions of code to be executed differently each time based on a parameter
11+
>`System.out.println("HELLO")` is a function that changes its execution based on the parameter passed, the string. We'll cover these very soon!
12+
13+
- [**Loops**](./Loops.md) : Repeats a block of code several times, either in iteration, or while a condition is true.
1214
>Imagine printing
1315
>```python
1416
>>>> Hello 1
1517
>>>> Hello 2
1618
>>>> Hello 3
1719
>```
18-
>with just a single block of code rather than 3 lines. Its more cleaner.
19-
>They will be covered more in depth later.
20+
>With just a single block of code that repeats rather than 3 lines.
21+
>They will be covered soon as well.
2022
21-
**If/Else** statements : Let you branch between different executions of the same code based on a condition.
23+
- [**If/Else**](./If-Else.md) statements : Let you branch between different executions of the same code based on a condition.
2224
>Like a human, we conditionally behave as well.
2325
>```
2426
>If hungry, Then Eat().
@@ -31,7 +33,7 @@ Control flow is the way a program decides what to do and when. Generally, code i
3133
## Jump Statements
3234
These statements move the "flow" of execution of code. Instead of the code running in a straight line down the file, jump statements move around where the execution occurs in the code.
3335
34-
```break``` : Stops a flow early
36+
- ```break``` : Stops a flow early
3537
```java
3638
for (int i = 0; i < 10; i++) {
3739
if (i == 3) break;
@@ -45,7 +47,7 @@ for (int i = 0; i < 10; i++) {
4547
>>>> 2
4648
>```
4749
48-
```continue``` : Skips the current iteration:
50+
- ```continue``` : Skips the current iteration:
4951
5052
```java
5153
for (int i = 0; i < 5; i++) {
@@ -61,7 +63,7 @@ for (int i = 0; i < 5; i++) {
6163
>>>> 4
6264
>```
6365
64-
Switch Cases:
66+
- Switch Cases:
6567
To chose between many options of a variable, and a cleaner than chaining ```if else``` statements.
6668
```java
6769
String day = "Tuesday";
@@ -85,7 +87,7 @@ switch (day) {
8587
>>>> Second day of the week
8688
>```
8789
88-
```Return ``` : End a function or execution of a loop, and output a value from the call
90+
- ```Return ``` : End a function or execution of a loop, and output a value from the call
8991
9092
```java
9193
public class MyClass {
@@ -132,4 +134,4 @@ System.out.println("Program continues...");
132134
>>>> Cannot divide by zero!
133135
>>>> Program continues...
134136
>```
135-
Without the try catch block, if the ArithmeticException went to Java, then the rest of any code following would not execute (see the print statement after not present in the terminal output).
137+
Without the try catch block, if the ArithmeticException went to Java, then the rest of any code following would not execute (see the print statement after not present in the terminal output). more

src/Java-Fundamentals/course/If-Else.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Java Branching: If, Else, Elif
1+
# Java Branching: If, Else, & Else if
22
This page is a continuation to the explanation of [control flow](./Control-Flow.md). `If` and `else` statements let your program conditionally execute particular blocks of code.
33

44
## If Statement

src/SUMMARY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
- [Variables](Java-Fundamentals/course/Variables.md)
66
- [Mathematical Operators](Java-Fundamentals/course/Operators-And-Math.md)
77
- [Boolean & Equality Operators](Java-Fundamentals/course/Boolean-And-Equality-Operators.md)
8-
- [Arrays](Java-Fundamentals/course/Arrays.md)
98
- [Control Flow](Java-Fundamentals/course/Control-Flow.md)
109
- [If-Else](Java-Fundamentals/course/If-Else.md)
10+
- [Arrays](Java-Fundamentals/course/Arrays.md)
1111
- [Loops](Java-Fundamentals/course/Loops.md)
1212
- [Functions](Java-Fundamentals/course/Functions.md)
1313
- [👨‍💻 Object-Oriented Programming (OOP)](Object-Oriented-Programming/Intro.md)
@@ -36,7 +36,7 @@
3636
- [Advanced String Usage]()
3737
- [Arraylists](Advanced-Java/Arraylists.md)
3838
- [Hashmaps](Advanced-Java/Hashmaps.md)
39-
- [Hashsets](Advanced-Java/Hashsets2.md)
39+
- [Hashsets]()
4040
- [Lambdas](Advanced-Java/Lambdas.md)
4141
- [Style Guide]()
4242

0 commit comments

Comments
 (0)