Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

java bean serializable interface

Posted on 2014-01-10
3
Medium Priority
?
1,203 Views
Last Modified: 2014-01-28
Hi,

I am going through below link
http://www.avajava.com/tutorials/lessons/what-is-a-javabean.html

I wonder why java bean needs to implement the serializable interface.

Are there are scenarios where there is no need for java bean to save object to Database or file system so that we do not need to implement serializable interface.(any sample example for that scenario).

In this link they said 'Refrigerator'. I did not get in what context author mentioned that.

please advise
Any links resources ideas highly appreciated. Thanks in advance
0
Comment
Question by:gudii9
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 35

Expert Comment

by:girionis
ID: 39773627
You do not need to implement the Serializable interface, unless you need to serialise the data, i.e. you need to pass the bean remotely to another JVM or you need to save its state on the disk.
0
 
LVL 7

Author Comment

by:gudii9
ID: 39784046
you need to pass the bean remotely to another JVM or you need to save its state on the disk. 

Open in new window


Are these two scenarios for 'no need to serialize data' ?
why do we need to pass bean remotely to another JVM
I am not very clear. Please advise
0
 
LVL 35

Accepted Solution

by:
girionis earned 2000 total points
ID: 39789386
Are these two scenarios for 'no need to serialize data' ?

No, they are the scenarios for "I need to serialise data".

why do we need to pass bean remotely to another JVM

If you are making a remote method call for example. If someone has implemented a remote application and you need access to it. There are several scenarios where this could be useful.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
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…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
Suggested Courses

604 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