Skip to content

Commit 0478bd4

Browse files
committed
Fix typos on 2.4
1 parent 61a040b commit 0478bd4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

data/part-2/4-methods.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ import java.util.Scanner;
6464

6565
public class Example {
6666
public static void main(String[] args) {
67-
Scanner scanned = new Scanner(System.in);
67+
Scanner scanner = new Scanner(System.in);
6868
// program code
6969
}
7070

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

18861886
<!-- 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. -->
18871887

1888-
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.
1888+
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.
18891889

18901890
<!-- ```java
18911891
public static void main(String[] args) {
@@ -1959,7 +1959,7 @@ main
19591959

19601960
<!-- 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. -->
19611961

1962-
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.
1962+
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.
19631963

19641964
<!-- <sample-output>
19651965
summa

0 commit comments

Comments
 (0)