what is the use of Clonable,and serializable interface?



what is the use of Clonable,and serializable interface?..

Answer / amit singh

serialzable and cloneable interface both are marker
interface
Cloneable interface:
if any class implements this interface .so this interface
its just a indicator or marker that a particular class
going touse clone() of the Object class to field tio field
copy of the instance ofthe particular class.


Serializable:
its also the interface .if any class implements it so means
that this particular class object convert in byte and going
to save in a locakl disk
and also its useful to send object in a Byteform to the
network.
and at the another network it will convert from byte to
Object of particular type.

Is This Answer Correct ?    48 Yes 5 No

Post New Answer

More Core Java Interview Questions

If an application has multiple classes in it, is it okay to have a main method in more than one class?

0 Answers  


Which class represents the socket that both the client and server use to communicate with each other?

0 Answers  


Is it possible to instantiate the abstract class?

0 Answers  


Can we use this () and super () in a method?

0 Answers  


What is Session and cookies?Explain in detail with an example?

4 Answers   Accenture, CTS,






What is meant by distributed application? Why are we using that in our application?

0 Answers  


which one is more efficient int x; 1. if(x==null) 2.if(null==x) state which one either 1 or 2?

6 Answers   HP, SparkTG,


what is the difference b/w static and final methods?

1 Answers  


How does a try statement determine which catch clause should be used to handle an exception?

2 Answers  


what is encapsulation in java? Explain

0 Answers  


Can a constructor call the constructor of parent class?

0 Answers  


What Is Query Throttling in java?

0 Answers   HCL,


Categories