Java enums + template method design pattern

Let’s consider the following code snippets: public enum Currency { EUR, USD }   String currency = “EUR”; if(Currency.EUR.name().equals(currency)){ System.out.println(“Transfer permitted”); } How often do we see much the same scenario? It is not completely wrong since there is a try to use enums so it is not entirely “string driven” programming. However there is … Read more