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

What are thread groups?

0 Answers  


which of tha following is not a thread safe class? a) ArrayList b)Vector c)HashTable d)None

17 Answers  


what is for datainputstream?

1 Answers  


What is a nested structure?

0 Answers  


What is Java exception handling?

1 Answers  


What is a parent class in java?

0 Answers  


What is java algorithm?

0 Answers  


What is identifier with example?

0 Answers  


What is Gang of four design patterns

0 Answers   Infosys,


how can i use a nonsynchronized hashtable?

0 Answers   CoreObjects,


In method overloading ,if i change the return type to Long instead of INT,is the program execute

6 Answers   HCL,


Explain thread in java?

0 Answers  


Categories