In this guide to Java enum with string values, learn to create enum using strings, iterate over all enum values, get enum value and to perform reverse lookup to find enum by string parameter.
You must have heard multiple times that enum are always best choice for implementing singleton design pattern in java. Are they really best? If it is then how it is better than other available techniques? Let’s find out. Writing a singleton implementation is always tricky. I discussed already couple of methods (including my favorite method […]
Java enum example. The purpose of enum is to enforce compile time type safety. Learn enum constructors, methods, inheritance, EnumMap and EnumSet etc.