We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 332d2eb commit 27cbf4dCopy full SHA for 27cbf4d
lessons/jumps.md
@@ -141,20 +141,17 @@ Output: `13`
141
#### Method with return type void
142
```java
143
// Main method
144
-class CodeExample {
+class CodeExample {
145
// Method 1
146
public static void demoFunction(int n) {
147
- if(n<10){
+ if(n<10) {
148
// 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.
+ // control exits the method if this condition(i.e, n<9) is true.
150
return;
151
- }
152
- else{
+ } else {
153
n++;
154
}
155
156
-}
157
-
158
// Main driver method
159
public static void main(String[] args){
160
int n = 8;
0 commit comments