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 does %d do in java?

0 Answers  


Difference between concurrent hashmap and hashtable and collections

0 Answers  


What do you understand by the term singleton?

0 Answers  


Define the term string pool?

0 Answers  


why top level class could not be static

3 Answers   L&T,






What is proper subset?

0 Answers  


why we need this (1.object,2.class,3.data hiding,4.encapsulation,5.abstraction,6. polymorphism,7.inheritance)

2 Answers  


What do you know about the garbage collector?

0 Answers  


What is treemap in java?

0 Answers  


What is variable and its types?

0 Answers  


What is the main use of generics in java?

0 Answers  


what are class,constructor and primitive data types?

2 Answers   IBM,


Categories