How To Serialize and Deserialize Enums
In this tutorial, we will see serialization and deserialization of Enums and sample java codes. Enums Serialization: Java’s Serializable interface handles serialization of enums in a special way. Enum types…
In this tutorial, we will see serialization and deserialization of Enums and sample java codes. Enums Serialization: Java’s Serializable interface handles serialization of enums in a special way. Enum types…
ExecutorService and CompletionService are both interfaces in the Java concurrency framework that provide a way to execute tasks asynchronously in a multithreaded environment. However, they serve different purposes. ExecutorService provides…
What is the Java Executor Framework? The Java Executor Framework is a set of interfaces and classes in Java that simplify the task of writing concurrent code. It provides a…
In this post, we will learn various ways of converting input stream to String In this example, we will see that InputStream will be converted to String using java8 streams…
In this post, we will see questions asked on String during java interview 1. Explain String pool in java? String Pool is java string literals pool that JVM maintains a…
Circular references during serialization in Java can cause StackOverflowError or OutOfMemoryError exceptions. This happens because a circular reference creates a loop in the object graph that the serialization process tries…
In Java, serialization of inner classes can be a bit tricky due to the relationship between inner classes and their enclosing classes. Static inner classes are serializable just like any…
In Java, serialization works with inheritance in the following way: If a class implements Serializable, its subclasses will also be serializable, regardless of whether the subclasses implement Serializable or not.…
In this tutorial, we will learn more and in detail on Java Serialization and Deserialization. Java serialization is very import topic and every developer should know this topic. Serialization: Java…
In this post, we will see more details on SerialVersionUID and also issues with default serial version id. SerialVersionUID: Java uses serialVersionUID field for versionsing. It’s a static and final…