Skip to content

Commit 09dedfe

Browse files
committed
Fix small issues
1 parent 80e2bcb commit 09dedfe

6 files changed

+15
-15
lines changed

chapter-01-first-steps-in-programming.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ Test your solution here: [https://judge.softuni.org/Contests/Practice/Index/646#
355355
356356
Write a Java console program that **prints the numbers from 1 to 20** on separate lines on the console.
357357
358-
### Hints and
358+
### Hints and Guidelines
359359
360360
Create a new Java class and name it **`Nums1to20`** (right click on the **`src`** folder -> [New] -> [Java Class])
361361

chapter-03-simple-conditions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Like the example above, read the grade from the console and check if it is excel
107107
Test your solution here: [https://judge.softuni.org/Contests/Practice/Index/651#1](https://judge.softuni.org/Contests/Practice/Index/651#1).
108108

109109

110-
## The Curly Brackets {} After If \/ Else
110+
## The Curly Brackets `{}` After If \/ Else
111111

112112
When we have **only one command** in the body of the **`if` statement**, we can **skip the curly brackets**. When we want to execute a **block of code** (group of commands), curly brackets are required, because if we skip them, **only the first line** after the **`if` clause** will be executed.
113113

chapter-04-complex-conditions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Test your solution here: [https://judge.softuni.org/Contests/Practice/Index/653#
9191

9292
Let's take a look at how we can create more complex logical conditions. We can use the logical "**AND**" (**`&&`**), logical "**OR**" (**`||`**), logical **negation** (**`!`**) and **brackets** (**`()`**).
9393

94-
### Logical "AND"
94+
### Logical `AND`
9595

9696
As we saw, in some problems we have to make **many checks at once**. But what happens when to execute some code **more** conditions have to be executed and we **don't want to** make a **negation** (**`else`**) for each one of them? The option with nested **`if` blocks** are valid, but the code would look very **unordered** and for sure – **hard** to read and maintain.
9797

chapter-07-complex-loops.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ We can use the following idea to solve the problem:
262262
Test your solution here: [https://judge.softuni.org/Contests/Practice/Index/659#8](https://judge.softuni.org/Contests/Practice/Index/659#8).
263263

264264

265-
## Infinite Loops and break Operator
265+
## Infinite Loops and `break` Operator
266266

267267
So far, we got acquainted with different types of loops and learned about their constructions and how they are applied. Now, we need to understand what an **infinite loop** is, when it occurs and how we can **terminate** its execution through the **`break`** operator.
268268

@@ -278,7 +278,7 @@ And here is what an **infinite `for`** loop looks like:
278278

279279
![](assets/chapter-7-1-images/00.Infinite-for-loop-01.png)
280280

281-
### The break Operator
281+
### The `break` Operator
282282

283283
We already know that the infinite loop executes a specific code to infinity, but what if we want to forcibly exit the loop under a given condition at some point? In this situation, the **`break`** operator comes in handy.
284284

@@ -357,7 +357,7 @@ Note: although the code above is correct, it will not work if the user enters te
357357
Test your solution here: [https://judge.softuni.org/Contests/Practice/Index/659#10](https://judge.softuni.org/Contests/Practice/Index/659#10).
358358

359359

360-
## Nested Loops and The break Operator
360+
## Nested Loops and The `break` Operator
361361

362362
Having learned what **nested loops** are and how the **`break`** operator performs, it is time to understand how they both work together. For a better understanding, let’s write a step-by-step **program** that should make all possible combinations of **pairs of numbers**. The first number of the combination is increasing from 1 to 3, and the second one is decreasing from 3 to 1. The problem must continue running until **`i + j`** **is not equal** to 2 (i.e., **`i = 1`** and **`j = 1`**).
363363

@@ -390,21 +390,21 @@ Thus, when **`i + j = 2`**, the program will set the **`hasToEnd = true`** and e
390390
Test your solution here: [https://judge.softuni.org/Contests/Practice/Index/659#11](https://judge.softuni.org/Contests/Practice/Index/659#11).
391391

392392

393-
## Error Handling: try-catch Construction
393+
## Error Handling: `try-catch` Construction
394394

395395
The last thing we will get familiar with within this chapter is how to "catch" **errors** with the **`try-catch`** construction.
396396

397-
### What is a try-catch?
397+
### What is a `try-catch`?
398398

399399
The **`try-catch`** program construction is used to **intercept and handle exceptions (errors)** during the program execution.
400400

401401
In programming, **exceptions** are notifications of an event that disrupts the normal operation of a program. Such exceptional events **interrupt the execution** of our program, and it is looking for something to handle the situation. If it does not find it, the exception is printed on the console (the program "fails"). If it finds, **the exception is processed** and the program continues its normal execution without "failing". In a bit, we will see how this happens.
402402

403403
When an exception occurs, the exception is said to have been **”thrown” (throw exception)**. Hence the expression **”catch exception”**.
404404

405-
### The try-catch Construction
405+
### The `try-catch` Construction
406406

407-
The **`try-catch`** construction has different types, but for now, we will get acquainted only with the most basic of them, where the **`catch`** block will intercept any error in a variable named **`ex `**
407+
The **`try-catch`** construction has different types, but for now, we will get acquainted only with the most basic of them, where the **`catch`** block will intercept any error in a variable named **`ex`**
408408

409409
![](assets/chapter-7-1-images/00.Try-catch-01.png)
410410

chapter-10-methods.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ If we **replace** **`void`** with **a type** of some variable, this will tell th
247247

248248
We should note that **the result** returned by the method can be of **a type, compatible with the type of the returned value** of the method. For example, if the declared type of the returned value is **`double`**, we can return a value of **`int`** type.
249249

250-
### The return Operator
250+
### The `return` Operator
251251

252252
To obtain a result from the method, we need to use the **`return`** operator. It should be **used in the body** of the method and tells the program to **stop its execution** and to **return** to the method's caller, a **value** that is defined by the expression after the **`return`** operator.
253253

@@ -263,7 +263,7 @@ We have a method in the example below, which compares two numbers and returns a
263263

264264
![](assets/chapter-10-images/10.Return-operator-02.png)
265265

266-
#### Code After a "return" is Unreachable
266+
#### Code After a `return` is Unreachable
267267

268268
When the **return** operator is located inside a conditional statement such as **`if`**, after the statement in the same block, we must **not** have rows with code because IntelliJ IDEA will display a warning telling us that it had found an **unreachable** statement.
269269

@@ -274,7 +274,7 @@ When the **return** operator is located inside a conditional statement such as *
274274
with the phrase <b><i>write</i> <code>return; return;</code> <i>and let's go home</i></b>”, to explain that the logic of the program is wrongly typed.</td></tr>
275275
</table>
276276

277-
### Using The "return" Value of a Method
277+
### Using The `return` Value of a Method
278278

279279
After a method is executed and has returned a value, we can use the value in several ways.
280280

@@ -365,7 +365,7 @@ As we mentioned, if you use **the same name for several methods with different s
365365

366366
![](assets/chapter-10-images/14.Method-overloading-01.png)
367367

368-
### Signature and The return Value Type
368+
### Signature and The `return` Value Type
369369

370370
It is important to say that **the returned type as a result** of the method **is not a part of its signature**. If the returned type was a part of the signature, then the compiler doesn't know which method exactly to call (there is ambiguity).
371371

chapter-11-tricks-and-hacks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ if (condition) {
342342
To make it easier we can use a **code snippet** for an **`if` construction**:
343343
* **`if` + [Enter]**
344344

345-
### How to Write a 'For' Loop?
345+
### How to Write a `for` Loop?
346346

347347
For a **`for` loop** we need a couple of things:
348348

0 commit comments

Comments
 (0)