Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #441

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions data/part-1/6-conditional-statements.md
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,7 @@ int luku = 7;
if (luku >= 5 && luku <= 10) {
System.out.println("On! :)");
} else {
System.out.println("Ei ollut :(")
System.out.println("Ei ollut :(");
}
``` -->

Expand All @@ -1105,7 +1105,7 @@ int number = 7;
if (number >= 5 && number <= 10) {
System.out.println("It is! :)");
} else {
System.out.println("It is not :(")
System.out.println("It is not :(");
}
```

Expand All @@ -1127,7 +1127,7 @@ int luku = 145;
if (luku < 0 || luku > 100) {
System.out.println("On! :)");
} else {
System.out.println("Ei ollut :(")
System.out.println("Ei ollut :(");
}
``` -->

Expand All @@ -1138,7 +1138,7 @@ int number = 145;
if (number < 0 || number > 100) {
System.out.println("It is! :)");
} else {
System.out.println("It is not :(")
System.out.println("It is not :(");
}
```

Expand All @@ -1159,7 +1159,7 @@ int luku = 7;
if (!(luku > 4)) {
System.out.println("Luku ei ole suurempi kuin 4.");
} else {
System.out.println("Luku on suurempi tai yhtäsuuri kuin 4.")
System.out.println("Luku on suurempi tai yhtäsuuri kuin 4.");
}
``` -->

Expand All @@ -1169,7 +1169,7 @@ int number = 7;
if (!(number > 4)) {
System.out.println("The number is not greater than 4.");
} else {
System.out.println("The number is greater than 4.")
System.out.println("The number is greater than 4.");
}
```

Expand Down
6 changes: 3 additions & 3 deletions data/part-2/4-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ import java.util.Scanner;

public class Example {
public static void main(String[] args) {
Scanner scanned = new Scanner(System.in);
Scanner scanner = new Scanner(System.in);
// program code
}

Expand Down Expand Up @@ -1885,7 +1885,7 @@ Let's observe the same program by visualizing its execution step-by-step. The ap

<!-- Tarkastellaan seuraavaksi esimerkkiä, missä metodi palauttaa arvon. Ohjelman `main`-metodi kutsuu erillistä `kaynnista`-metodia, jossa luodaan kaksi muuttujaa, kutsutaan `summa`-metodia, ja tulostetaan `summa`-metodin palauttama arvo. -->

Let's now study an example where the method returns a value. The `main` method of the program calls a separate `start` method, inside of which two variables are created, the `sum` method is called, and the the value returned by the `sum` method is printed.
Let's now study an example where the method returns a value. The `main` method of the program calls a separate `start` method, inside of which two variables are created, the `sum` method is called, and the value returned by the `sum` method is printed.

<!-- ```java
public static void main(String[] args) {
Expand Down Expand Up @@ -1959,7 +1959,7 @@ main

<!-- Komento `int summa = summa(eka, toka);` luo metodiin `kaynnista` muuttujan `summa`, ja kutsuu metodia `summa`. Metodi `kaynnista` jää odottamaan. Koska metodissa `summa` on määritelty parametrit `luku1` ja `luku2`, luodaan ne heti metodin suorituksen alussa, ja niihin kopioidaan parametrina annettujen muuttujien arvot. -->

The command `int sum = sum(first, second);` creates the variable `sum` in the method `start` and calls the method `sum`. The method `start` enters a waiting state. Since the parameters `number1` and `number2` are defined in the method `sum`, they are created right at the beginning of the method's execution, after which the values of the variables given as parametes are copied into them.
The command `int sum = sum(first, second);` creates the variable `sum` in the method `start` and calls the method `sum`. The method `start` enters a waiting state. Since the parameters `number1` and `number2` are defined in the method `sum`, they are created right at the beginning of the method's execution, after which the values of the variables given as parameters are copied into them.

<!-- <sample-output>
summa
Expand Down