Skip to content

Instantly share code, notes, and snippets.

@dsosby dsosby/gist:1754623
Created Feb 6, 2012

Embed
What would you like to do?
Patterns
public class Foo {
boolean a;
int b;
public Foo() {
a = true;
b = 42;
}
}
public class Bar {
boolean a;
int b;
public Bar() {
initialize();
}
private void initialize() {
a = true;
b = 42;
}
}
public class Baz {
boolean a;
int b;
private Baz() {
}
public static getBaz() {
Baz instance = new Baz();
instance.a = true;
instance.b = 42;
return instance;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.