News

This article explores how interfaces can be utilized with Java enums, providing detailed examples and explanations to illustrate their practical applications. Basics of Enum Declaration and Interface ...
Think you've nailed the basics of Java pattern matching? Keep learning with these Java pattern matching examples involving records, inferred types and generics.
[BUG] UtilityClass nested in an enum does not work after upgrading to Java 21 #3679 ...
Learn about serialization in Java with our comprehensive tutorial. We provide examples to help you understand how serialization works.
Hi, recently we migrated to Java 17, but we're having some problems with Enum mocking. We are using mockito-inline and that helped a lot, but there are still problems with some of the Enums that have ...
JPA and Hibernate enum mapping The Java enum, introduced in Java 5, will map to the underlying database without any intervention. The JPA framework, be it Hibernate or Toplink or DataNucleus, will ...
An example of an SDK classes that make use of this feature is the TimeUnit enum (see my blog post on this). Another example is Guava’s CaseFormat enum (via its to (CaseFormat,String) method).
Although it is part of the java.util.concurrent package, the TimeUnit enum is useful in many contexts outside of concurrency .