Skip to content

Commit

Permalink
[java/annalyns-infiltration] Remove knightIsAwake from examples in co…
Browse files Browse the repository at this point in the history
…mments (#2356)

This is to try make it clearer that the example in the comment isn't
the solution for the task.

Resolves exercism/java-analyzer#188
  • Loading branch information
kahgoh authored Jul 20, 2024
1 parent 6aafb17 commit e1bcb4a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ Example :

```java
// instead of
if (knightIsAwake) {
if (someExpression) {
return true;
} else {
return false;
}

// ... return the expression directly
return knightIsAwake;
return someExpression;
```
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Instead of comparing booleans with the literal values, it can be simplified to j

```java
// instead of
return knightIsAwake == true;
return someBoolVariable == true;

// use
return knightIsAwake;
return someBoolVariable;
```

0 comments on commit e1bcb4a

Please sign in to comment.