Commit adada4d2 authored by Trisha Gee's avatar Trisha Gee
Browse files

[Ch15] DailyAdviceServer formatting.

parent 1e2d9ed0
Loading
Loading
Loading
Loading
+3 −2
Changes for src/main/java/ch15/DailyAdviceServer.java: 3 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -7,11 +7,13 @@ import java.net.Socket;
import java.util.Random;

public class DailyAdviceServer {
  final private String[] adviceList = {"Take smaller bites",
  final private String[] adviceList = {
          "Take smaller bites",
          "Go for the tight jeans. No they do NOT make you look fat.",
          "One word: inappropriate",
          "Just for today, be honest. Tell your boss what you *really* think",
          "You might want to rethink that haircut."};
  private final Random randomGenerator = new Random();

  public static void main(String[] args) {
    DailyAdviceServer server = new DailyAdviceServer();
@@ -37,7 +39,6 @@ public class DailyAdviceServer {
  }

  private String getAdvice() {
    Random randomGenerator = new Random();
    return adviceList[randomGenerator.nextInt(adviceList.length)];
  }
}
 No newline at end of file