-
-
Save mmhan/452ae516ec19d7d0c78b9a06ba2f1876 to your computer and use it in GitHub Desktop.
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
// simple constructor | |
// | |
private final int x; | |
private final int y; | |
private final String z; | |
| |
public MyClass(int x, int y, String z) { | |
this.x = x; | |
this.y = y; | |
this.z = z; | |
} | |
| |
| |
// complex building | |
// | |
public static MyClass create(List<Stuff> list, Set<Stuff> set) { | |
// int x = some brains... | |
// int y = more brains... | |
// other brains... | |
// String z = more complex stuff here | |
// | |
return new MyClass(x, y, z); | |
} | |
| |
private final int x; | |
private final int y; | |
private final String z; | |
| |
private MyClass(int x, int y, String z) { | |
this.x = x; | |
this.y = y; | |
this.z = z; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment