Search:

Type: Posts; User: helloworld922

Search: Search took 0.19 seconds.

  1. Replies
    3
    Views
    2,502

    Re: how to initialise set in a constructor

    Ah. Ok, so what you will need to do is first of all put a parameter for your constructor that gives it the original list of numbers.


    public PhoneBook(TreeSet<Integer> numbers)


    The TreeSet...
  2. Replies
    3
    Views
    2,502

    Re: how to initialise set in a constructor

    That's not enough information for us to figure out what is wrong. Is the variable numbers being setup in the super constructor, or is it being passed to your constructor for duplicating? Do you want...
Results 1 to 2 of 2