I have a java method which is supposed to check 20 inputs parameters for empty and return a message
Example:
public String CheckEmpty(String a,String b,String c, String d,String e, String f, String g, String i,String j, String k,.....) {
String str="";
if(a.isEmpty()){
str= "a is empty";
}
if(b.isEmpty()){
str= "b is empty";
}
return str;
}
I need to check for the if condition for all inputs? there are around 20 inputs or is there any efficient way of doing the same check in java ?
Please advise.