Search:

Type: Posts; User: KevinWorkman

Search: Search took 0.18 seconds.

  1. Thread: Iterator

    by KevinWorkman
    Replies
    9
    Views
    1,090

    Re: Iterator

    Like I said, your best bet is to look at the source for the Vector.iterator() function. It looks like this:


    /**
    * Returns an iterator over the elements in this list in proper sequence.
    ...
  2. Thread: Iterator

    by KevinWorkman
    Replies
    9
    Views
    1,090

    Re: Iterator

    No, *you* give a short example. How are you getting your Iterator? What does the function that returns the Iterator actually do? You can access the source code of any Java method via the src.zip file...
  3. Thread: Iterator

    by KevinWorkman
    Replies
    9
    Views
    1,090

    Re: Iterator

    That depends on how you're getting the interface. It could be any number of classes.
  4. Thread: Iterator

    by KevinWorkman
    Replies
    9
    Views
    1,090

    Re: Iterator

    Here is an example:

    List is an interface. The ArrayList class is an implementation of that interface. Since an ArrayList *is a* List, you can have code like this:

    List myList = new ArrayList();...
  5. Thread: Iterator

    by KevinWorkman
    Replies
    9
    Views
    1,090

    Re: Iterator

    The API is your best friend. This is the first result for googling "Java iterator": Iterator (Java Platform SE 7 )

    According to the API, it's an interface. But asking whether something is an...
Results 1 to 5 of 5