Skip to content

Commit 484bf4f

Browse files
authored
Update introduction.md
1 parent 8fd1f65 commit 484bf4f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

concepts/basics/introduction.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Calculator {
2424
}
2525
```
2626

27-
A function within a class is referred to as a _method_. Each _method_ can have zero or more parameters. All parameters must be explicitly typed, there is no type inference for parameters. Similarly, the return type must also be made explicit. Values are returned from _methods_ using the `return` keyword. To allow a _method_ to be called by other classes, the `public` access modifier must be added.
27+
A function within a class is referred to as a _method_. Each method can have zero or more parameters. All parameters must be explicitly typed, there is no type inference for parameters. Similarly, the return type must also be made explicit. Values are returned from methods using the `return` keyword. To allow a method to be called by other classes, the `public` access modifier must be added.
2828

2929
```java
3030
class Calculator {
@@ -34,10 +34,10 @@ class Calculator {
3434
}
3535
```
3636

37-
Invoking a method is done by specifying its class and method name and passing arguments for each of the method's parameters.
37+
Invoking/calling a method is done by specifying its class and method name and passing arguments for each of the method's parameters.
3838

3939
```java
40-
int sum = new Calculator().add(1, 2);
40+
int sum = new Calculator().add(1, 2); // here the "add" method has been called to perform the task of addition
4141
```
4242

4343
Scope in Java is defined between the `{` and `}` characters.

0 commit comments

Comments
 (0)