+ 2

Java does not support default value for methods.

c++ and other langs. support default value for a parameters but java doesn't support it. what other approach should i use to regain this powerful feature?

17th Dec 2016, 4:13 PM
Redet Getachew
Redet Getachew - avatar
2 Respostas
0
I guess you'll have to stick with the normal function overloading to achieve what you want
17th Dec 2016, 11:58 PM
Omar Einea
Omar Einea - avatar
0
Like this public void test() { test("exampleText"); } public void test(String name) { }
18th Dec 2016, 6:50 PM
Dago VF
Dago VF - avatar