Search:

Type: Posts; User: sravya

Search: Search took 0.09 seconds.

  1. Replies
    6
    Views
    1,346

    Re: clone method in java

    Thank You so much!!
  2. Replies
    6
    Views
    1,346

    Re: clone method in java

    But without calling the constructor how does it create an object? if it calls the constructor why calling clone() in the above example (CloningEx ce1 = (CloningEx)ce.clone() ; ) did not print the...
  3. Replies
    6
    Views
    1,346

    Re: clone method in java

    Hi,

    Thanks for the reply. I shall give you an example.

    public class CloningEx implements Cloneable{
    int b;
    CloningEx(){
    System.out.println("Default constructor");
    }
  4. Replies
    6
    Views
    1,346

    clone method in java

    Hi,

    I heard that clone() method in java creates a copy of an object without calling the constructor. how does it create an another object without calling the constructor? i tried looking into...
Results 1 to 4 of 4