Skip to content

Instantly share code, notes, and snippets.

@jellybob
Last active January 21, 2019 12:40
Show Gist options
  • Select an option

  • Save jellybob/acfd242a8e1cec151ec231226c3a4607 to your computer and use it in GitHub Desktop.

Select an option

Save jellybob/acfd242a8e1cec151ec231226c3a4607 to your computer and use it in GitHub Desktop.

Revisions

  1. jellybob revised this gist Jan 21, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion foo.java
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@ public String toString() {
    String message = "The book, " + title + " was written by " + getAuthorName() + " it is " + pageCount() + " pages long.";

    if (!this.author.alive) {
    message = message + " It will become public domain in " + getYearsToPublicDomain() + " years._;
    message = message + " It will become public domain in " + getYearsToPublicDomain() + " years.";
    }

    return message;
  2. jellybob created this gist Jan 21, 2019.
    9 changes: 9 additions & 0 deletions foo.java
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    public String toString() {
    String message = "The book, " + title + " was written by " + getAuthorName() + " it is " + pageCount() + " pages long.";

    if (!this.author.alive) {
    message = message + " It will become public domain in " + getYearsToPublicDomain() + " years._;
    }

    return message;
    }