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


Please Help Members By Posting Answers For Below Questions

What is anti pattern in cyber security?

528


Why is method overloading not possible by changing the return type in java?

593


What is string in java? String is a data type?

580


Why spring singleton is not thread safe?

566


How many arguments can be passed to main ()?

525






What flag up means?

600


Explain the different forms of polymorphism?

569


What do you mean by stream pipelining in java 8?

738


Can we have a try block without catch block?

569


Can private method static?

473


What does t in java mean?

535


What is difference between fail-fast and fail-safe?

586


How do you declare a variable?

629


What is an anonymous class in java?

544


Define jre i.e. Java runtime environment?

574