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 is anti pattern in cyber security?
Why is method overloading not possible by changing the return type in java?
What is string in java? String is a data type?
Why spring singleton is not thread safe?
How many arguments can be passed to main ()?
What flag up means?
Explain the different forms of polymorphism?
What do you mean by stream pipelining in java 8?
Can we have a try block without catch block?
Can private method static?
What does t in java mean?
What is difference between fail-fast and fail-safe?
How do you declare a variable?
What is an anonymous class in java?
Define jre i.e. Java runtime environment?