Java Made Simple: What is Java transient variable?

To know about Java transient, first you must understand Serialization because the roots of transient lies in Serialization or transient is used only with Serialization and in other places it is never used at all. By the by, transient is a keyword of Java used as access modifier (like static, final etc). It is used …

Java Made Simple: What is Java transient variable? Read More »

Marker interfaces Java

After knowing what is serialization, let us know something more. To support serialization, package comes with interface Serializable and two classes ObjectOutputStream and ObjectInputStream. 1. class Following is the class signature public class ObjectOutputStream extends OutputStream implements ObjectOutput, ObjectStreamConstants The methods of ObjectOutputStream are capable to save the state of primitive data types …

Marker interfaces Java Read More »

What is Serialization in Java?

Serialization Introduction Before going into the subject, let us see some code which is very laborious and how Serialization makes it easy. import*; public class Student { int marks; String name; public static void main(String args[]) throws IOException { Student std1 = new Student(); std1.marks = 50; = “S N Rao”; DataOutputStream dos …

What is Serialization in Java? Read More »