My code look like this(sample)
if(age>65 && gender.equals("M")&&country.equals("USA")&& salary>4000){
//some logic
}else{
//some logic
}
Some if condition is even longer than this. I want to create a method that will take all conditions evaluate the value and return true or false.
I want something like:
if(AND(age>65 , gender.equals("M"),country.equals("USA"), salary>4000)){
//some logic
}else{
//some logic
}