Since Java 1.7, strings can be used with switch statements, which has me wondering about something. switch statements on integer values be turned into jump tables, which are faster than simply doing if checks on integers calculated at runtime; can a similar optimization be done with strings or is this just syntactic sugar?
Aucun commentaire:
Enregistrer un commentaire