Created
February 6, 2012 20:28
-
-
Save dsosby/1754623 to your computer and use it in GitHub Desktop.
Patterns
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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