Which way better?
if (name.equals("Pablo") || name.equals("Marko') || .. );
or
if (Sets.newHashSet("Pablo", "Marko", ..).contains(name));
Interest about memory using, performance, readabilty
Aucun commentaire:
Enregistrer un commentaire