Why java has no default value for arguments in method call

for example with c ++ i can write

void func(int a=1,int b=2){...}

using Java I need to create some methods

+3
source share
1 answer

This was not a feature that Java developers considered important enough to be included. Remember that Java was partially created as a reaction to the complexities of C ++.

+6
source

Source: https://habr.com/ru/post/1779107/