mercredi 17 juin 2020

Concat all nonNull properties of a POJO

I have a POJO which has 10-15 fields(can be primitive,Custom Object or String). I want to concat all the NonNull fields in a String.

Is there any clean way to do without using 10-15 if statements.

Aucun commentaire:

Enregistrer un commentaire