lundi 26 septembre 2016

How can I get parameters name same as a parameter in java

public void parametersForValidation(String name,String address){
validateParameters(name,address);
}

private void validateParameters(Object... values){
for(Object value:values){
Objects.requirNonNull(value,"Value is mandatory");
}
}

I want instead of "value is mandatory", parameter name like "Name is namdatory" and "address is mandatory" should come. Can anyone help.. Thanks in advannced





Aucun commentaire:

Enregistrer un commentaire