-
Notifications
You must be signed in to change notification settings - Fork 729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#1 #39
Comments
Then you probably should consider the builder pattern. https://github.com/cxxr/better-java#the-builder-pattern |
Builder pattern can resolve this question,But If it only has one attribute, why do you need to create a class? |
In Java, everything is an object. |
If a class includes only one string attribute ,Why not use string directly? |
Maybe we can use 'Optional' in java8! |
It was an example. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
public class DataHolder {
public final String data;
}
If it has many properties , create many construct method ? it similar to use get()/set() way
The text was updated successfully, but these errors were encountered: