Skip to content

Commit e3cf7e3

Browse files
authored
Merge pull request exercism#1016 from sjwarner-bp/bob-improve-ref
bob: improve reference solution
2 parents 17c7145 + 03b3745 commit e3cf7e3

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

  • exercises/bob/.meta/src/reference/java

‎exercises/bob/.meta/src/reference/java/Bob.java‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
/**
22
* Bob is a lackadasical teenager.
33
*/
4-
public class Bob {
5-
public String hey(String input) {
4+
class Bob {
5+
String hey(String input) {
66
input = normalize(input);
7-
if (isSilence(input))
7+
if (isSilence(input)) {
88
return "Fine. Be that way!";
9-
if (isShout(input))
9+
}
10+
if (isShout(input)) {
1011
return "Whoa, chill out!";
11-
if (isQuestion(input))
12+
}
13+
if (isQuestion(input)) {
1214
return "Sure.";
15+
}
1316
return "Whatever.";
1417
}
1518

0 commit comments

Comments
 (0)