Skip to content

Commit 07ba0ef

Browse files
authored
Update Introduction (exercism#2333)
* Update introduction.md * Fix a typo * Update introduction.md * Update introduction.md
1 parent c0db5a7 commit 07ba0ef

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

concepts/basics/introduction.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# Introduction
22

3-
Java is a statically-typed language, which means that everything has a type at compile-time. Assigning a value to a name is referred to as defining a variable. A variable is defined by explicitly specifying its type.
3+
Java is a statically-typed language, which means that the type of a variable is known at compile-time. Assigning a value to a name is referred to as defining a variable. A variable is defined by explicitly specifying its type.
44

55
```java
66
int explicitVar = 10;
77
```
88

9-
Updating a variable's value is done through the `=` operator. Once defined, a variable's type can never change.
9+
Updating a variable's value is done through the `=` operator. Here, `=` does not represent mathematical equality. It simply assigns a value to a variable. Once defined, a variable's type can never change.
1010

1111
```java
1212
int count = 1; // Assign initial value
1313
count = 2; // Update to new value
1414

15-
// Compiler error when assigning different type
15+
// Compiler error when assigning a different type
1616
// count = false;
1717
```
1818

@@ -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 functions 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.

exercises/concept/annalyns-infiltration/.docs/instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ AnnalynsInfiltration.canSignalPrisoner(archerIsAwake, prisonerIsAwake);
5353

5454
## 4. Check if the prisoner can be freed
5555

56-
Implement the (_static_) `AnnalynsInfiltration.canFreePrisoner()` method that takes four boolean values. The first three parameters indicate if the knight, archer and the prisoner, respectively, are awake. The last parameter indicates if Annalyn's pet dog is present. The method returns `true` if the prisoner can be freed based on the state of the three characters and Annalyn's pet dog presence. Otherwise, it returns `false`:
56+
Implement the (_static_) `AnnalynsInfiltration.canFreePrisoner()` method that takes four boolean values. The first three parameters indicate if the knight, archer and the prisoner, respectively, are awake. The last parameter indicates if Annalyn's pet dog is present. The method returns `true` if the prisoner can be freed based on the state of the three characters and Annalyn's pet dog's presence. Otherwise, it returns `false`:
5757

5858
```java
5959
boolean knightIsAwake = false;

0 commit comments

Comments
 (0)