Packages 6.21
Displaying per3 data
Person Details are………
Using overriden toString() Method:Name :Salman
Object Details from static method hashcode() of Object class
are………
Hash Code of Object:11394033
Line No. 2: declares a class Person4 implementing an interface called Cloneable.
Cloneable is called interface. More details about the interface in suc-
ceeding sections. All the methods described by interface are available
to Person4.
Line No. 4: is a constructor that assigns data to name as per argument supplied.
Line No. 10: overrides the static method toString() method. Hence when you
call toString() as in Line No. 8, own overridden method is called.
Line No. 11: defines the overridden tostring() method. Line No. 15 is about
Object CompareObjject(Person4 ...