Skip to content

Commit d05acac

Browse files
authored
Some changes in code and README
1 parent 3f5ce1e commit d05acac

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,12 +333,12 @@ class Sample{
333333
// Defining a static variable
334334
public static int number = 34;
335335
336-
public static void main(String[] a)[
336+
public static void main(String[] a){
337337
338338
// Accessing the static variable here
339339
System.out.println("Static variable declared inside the class : " + number);
340340
341-
]
341+
}
342342
}
343343
```
344344

@@ -421,6 +421,7 @@ Decision Making in programming is similar to decision-making in real life. In pr
421421
- if-else : The if statement alone tells us that if a condition is true it will execute a block of statements and if the condition is false it won’t. But what if we want to do something else if the condition is false? Here comes the else statement. We can use the else statement with the if statement to execute a block of code when the condition is false.
422422
- nested if : A nested if is an if statement that is the target of another if or else. Nested if statements mean an if statement inside an if statement. Yes, java allows us to nest if statements within if statements. i.e, we can place an if statement inside another if statement.
423423
- if else if ladder : Here, a user can decide among multiple options.The if statements are executed from the top down. As soon as one of the conditions controlling the if is true, the statement associated with that ‘if’ is executed, and the rest of the ladder is bypassed.
424+
- Switch Case : These are other kinds of block of statements that are used in order to run a particular block of code in regarding a particular case or value.
424425

425426
Note : Proper Code is given in the file [decision.java](https://github.com/ackwolver335/Java-Coder/blob/main/decision1.java) Click to go on it.
426427

0 commit comments

Comments
 (0)