- Serialisation is a concept where we can convert an object to binary format
- We can perform serialization Using externalizable interface or by extending serialisable interface and Overriding serialize method.
- externalizable is used in cases where parent class does not extend serializable But we want parent class to be serlized.
- We use write external and Read external methods.
- We serialise using readObject() and writeObject() methods.
- If we don’t want to serialise a property Then we use transient Annotation.
- The process of converting an object state into a format that can be easily transmitted and reconstructed back Is called as serialisation.
- We should not serialize data in Text files as it is in binary format. It will cause and encoding issues Making it unreadable Or causing loss of information. Better to use file format like .bin etc.
- For human variable format, we can save it as Jason.
- Introduction
- Installation
- Junit
- Arrays
- Classes
- Data Types
- Expressions
- Interfaces
- JDBC
- Loops
- OOPS
- Serializable
- Strings
- Constructors
- Package
- Java Servlets
- Deployment
- Logging
- JSP
- ANT
- Web Services and Sockets
- Struts
- JPA
- Object Injection
- Annotations
- Reflection API
- Static Blocks
- Java Native Interface (JNI)
- Multithreading
- Tomcat Server
- Java Web Toolkit(JWT)
- Archive Files
- EJB(Enterprise Java Beans)
- JConsole
- Memory Profiling
- Hashing
- Exceptions
- Java Map Interface
- Java 8
- Garbage Collection
- Java 11
- Collections
- Java 17
Serializable
Subscribe to:
Posts (Atom)
-
What is the way to import only static members of a class? We can import using “import static packagename.classname.*” We can import using “i...
-
How do you detect a deadlock in a running Java program? We can use Jconsole to check for Deadlock which comes with JDK. There are also other...
-
Q What is the purpose of this keyword in Java? In Java this keyword refers to current instance of the object. It is useful for differentiati...
No comments:
Post a Comment