Skip to content

Instantly share code, notes, and snippets.

@szymonkozak
Created February 20, 2018 00:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save szymonkozak/0d093e43fa229d2e7cf5efd67c15a17e to your computer and use it in GitHub Desktop.
Save szymonkozak/0d093e43fa229d2e7cf5efd67c15a17e to your computer and use it in GitHub Desktop.
public final class Foo {
private final int product = this.getNumber() * 2;
private final boolean isValid = true;
public final int getNumber() {
return this.isValid ? 1 : 0;
}
public final int getProduct() {
return this.product;
}
public final boolean isValid() {
return this.isValid;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment