Can I use optional as parameter in Java?

There are no optional parameters in Java . What you can do is overloading the functions and then passing default values. Show activity on this post. VarArgs and overloading have been mentioned.

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 *

Can I use optional as parameter in Java?

There are no optional parameters in Java . What you can do is overloading the functions and then passing default values. Show activity on this post. VarArgs and overloading have been mentioned.

Sizin İçin Seçtik  Üretim giderleri hangi hesaba aktarılır?

Leave a Reply

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