what is the use of Clonable,and serializable interface?
Answer Posted / 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 View All Answers
What are inner classes or non static nested classes in java?
Is space a char?
Which sorting is used in arrays sort in java?
What is the use of predicate in java 8?
What is string intern in java?
Is array a class?
What is jit compiler ?
Can we use catch statement for checked exceptions when there is no chance of raising exception in our code?
what is deadlock? : Java thread
How do you create a sop?
What is public/private protected in java?
Is vector synchronized in java?
How many threads does a core java have?
How do you remove duplicates in java?
Can a variable be local and static at the same time?