You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: exercises/practice/bob/.approaches/method-based-if-statements/content.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,6 +49,11 @@ This approach simplifies the main method `hey` by breaking down each response co
49
49
50
50
The `input` is trimmed using the `String`[`trim()`][trim] method to remove any leading or trailing whitespace. This helps to accurately detect if the input is empty and should prompt a `"Fine. Be that way!"` response.
51
51
52
+
~~~~exercism/caution
53
+
Note that a `null` `string` would be different from a `String` of all whitespace.
54
+
A `null` `String` would throw a `NullPointerException` if `trim()` were applied to it.
55
+
~~~~
56
+
52
57
### Delegating to Helper Methods
53
58
54
59
Each condition is evaluated using the following helper methods:
0 commit comments