Interview question: The meaning of Object serialization interface (Serializable) in Java

Source: Internet
Author: User
Tags object serialization serialization
Serializable interface is an interface with nothing inside
Its source code is public interface serializable{}, that is, nothing.
If there is nothing in an interface, then this interface is an identity interface, for example, a student encountered a problem, row the wrong row for a few days did not solve, at this time, she raised her hand (motioned me to help him solve), and then I used to help him solve, then this hand is actually a sign , The problem that I can't solve is to help him solve, this serializable interface in Java is for the JVM to see, tell the JVM, I do not do this class serialization, you (JVM) to me serialization, serialization is to become a binary stream, such as cloud computing, Hadoop, In particular, Hadoop is a completely distributed environment, then it involves the object to be transferred in the network, the inside is all binary stream, of course, you can do this serialization operation is also possible, but this class may also have a class, if you put the outside class object person into binary, Then it's also going to serialize (it's going to take a deep traversal, it's cumbersome), just tell the JVM to let him do it for you.

Interview question: The meaning of Object serialization interface (Serializable) in Java

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.