Skip to content
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

Default parameter in method #93

RaviH opened this issue May 19, 2019 · 0 comments


Copy link

@RaviH RaviH commented May 19, 2019

Is your feature request related to a problem? Please describe.
It would be great to have default parameter so that Java method can be overloaded.

public String foo(Int a) {
   return foo(a, “”);

public String foo(Int a, String b) {
   return String.valueOf(a) + b;

Describe the solution you'd like
May be something like:

public String foo(Int a, String b = “”) {
   return String.valueOf(a) + b;

Describe alternatives you've considered
or as you recommended:

public String foo(int a, @Def("") String b) {
   return String.valueOf(a) + b;

Additional context
Already discussed this in Gitter channel/room

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.