Skip to content

Commit 27cbf4d

Browse files
authored
code snippets fixed
1 parent 332d2eb commit 27cbf4d

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

lessons/jumps.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -141,20 +141,17 @@ Output: `13`
141141
#### Method with return type void
142142
```java
143143
// Main method
144-
class CodeExample {
144+
class CodeExample {
145145
// Method 1
146146
public static void demoFunction(int n) {
147-
if(n<10){
147+
if(n<10) {
148148
// return statement below(only using return statement and not returning anything)
149-
// control exits the method if this condition(i.e, n<9) is true.
149+
// control exits the method if this condition(i.e, n<9) is true.
150150
return;
151-
}
152-
else{
151+
} else {
153152
n++;
154153
}
155154
}
156-
}
157-
158155
// Main driver method
159156
public static void main(String[] args){
160157
int n = 8;

0 commit comments

Comments
 (0)