Search:

Type: Posts; User: sravya

Search: Search took 0.22 seconds.

  1. Replies
    2
    Views
    442

    Do not understand this API

    Why do addAll and removeAll methods contain different signature as highlighted below. Same thing with add and remove.

    boolean addAll(Collection<? extends E> c)

    boolean removeAll(Collection<?>...
  2. Replies
    6
    Views
    414

    Re: clone method in java

    Thank You so much!!
  3. Replies
    6
    Views
    414

    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...
  4. Replies
    6
    Views
    414

    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");
    }
  5. Replies
    6
    Views
    414

    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...
  6. Replies
    0
    Views
    112

    Getting stackoverflowerror

    Deleted
Results 1 to 6 of 6