Objectclone() method of object class can clone an object - Core Java

Q.  Which method of object class can clone an object?
- Published on 17 Jul 15

a. copy()
b. Objectcopy()
c. Objectclone()
d. Clone()

ANSWER: Objectclone()
 

    Discussion

  • dinesh   -Posted on 05 May 16
    `
  • Vishal Kulkarni   -Posted on 04 May 16
    The answer is Clone().This method is used to do exact copy of an object.there is no method as ObjectClone().refer java docs by oracle.
  • Prajakta Pandit   -Posted on 14 Dec 15

    - Objectclone() method of object class can clone an object.
    This method is used to create exact copy of an object.

    - Syntax :
    <protected Object clone() throws CloneNotSupportedException>

    - The 'java.lang.Cloneable' is implemented by the class whose object clone needs to be created, but if we cannot implement it then the Cloneable interface, it generates the 'CloneNotSupportedException.'

➨ Post your comment / Share knowledge


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)
▲