Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Importance of serializable?

Posted on 2006-11-09
1
Medium Priority
?
500 Views
Last Modified: 2012-06-22
When to implement serializable? when are not? Do I have to implement serializable all the time If my classes no need for future flexibility?
0
Comment
Question by:mon_pacey8
1 Comment
 
LVL 9

Accepted Solution

by:
owenli27 earned 150 total points
ID: 17911547
Serializable objects are ones that you can store as byte data and load back in at any time.  The any classes, which implemnets Serializable interface, may be written using ObjectOutputStream and read using ObjectInputStream.  

Usually, You should mark your classes Serializable if you wanted to store them in a database or if you needed to send them over a network, or if you want to pass them via RMI.   The Value Objects is good example for using serializable.
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This video teaches viewers about errors in exception handling.
Suggested Courses

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question