Is it mandatory to specify the same name for the parameters in declaration and definition of a function justify?

Two parameters cannot have the same name within a single declaration . If a parameter name is the same as a name outside the function, the name outside the function is hidden and cannot be used in the parameter declaration.

Sizin İçin Seçtik  Can you have a constructor with no parameters?

Leave a Reply

Your email address will not be published. Required fields are marked *

Is it mandatory to specify the same name for the parameters in declaration and definition of a function justify?

Two parameters cannot have the same name within a single declaration . If a parameter name is the same as a name outside the function, the name outside the function is hidden and cannot be used in the parameter declaration.

Sizin İçin Seçtik  Can we use optional as method parameter?

Leave a Reply

Your email address will not be published. Required fields are marked *