How to validate optional parameters in Java 
<p>I've a method which accepts 10 parameters and out of which 8 are mandatory. To check if the 8/10 are having not null values, i've a bunch of if-else statements for every parameter.</p>

<p>Writing this if-else code seems to be inelegant to me. Is there better way to do this?</p>

<p>Thank you
BC</p>
