I want to hear opinions and arguments on this topic, I'm pretty undecided.
The equals method is the best one for value equality/testing?
1 if (myString.equals("test"))
2 if ("test".equals(myString))
3 if ("test".compareTo(myString) == 0)
4 if (myString.compareTo("test") == 0)
Aucun commentaire:
Enregistrer un commentaire