Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
I want to force user to fill optional parameter in constructor: public MyClass(String... params) { this.params = params; } For now, next code is valid: new MyClass(); I want to prevent it. I thought of this: public MyClass(String param1, String... otherParams) { this.params = new String[1 + otherParams.length]; this.params[0] = param1; // fill 1..N params from otherParams } Sure String[] params is not an option, I need the ability to use comma separated args.
As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.