title: Declaring an iterator in Java
body: <p>I'm very confused about the iterator in Java.</p>
  
  <p>The tutorial is was reading said this:</p>
  
  <blockquote>
    <p>In the Java programming language, an interface is a reference type, similar to a class, that can contain only constants, method signatures, and nested types. There are no method bodies. Interfaces cannot be instantiated—they can only be implemented by classes or extended by other interfaces. Extension is discussed later in this lesson.</p>
  </blockquote>
  
  <p>Then I saw another tutorial with this:</p>
  
  <pre><code>Iterator&lt;String&gt; flavoursIter = aFlavours.iterator();
  </code></pre>
  
  <p>I understand that aFlavours has inheritated the iterator functions which returns the iterator interface. I just don't understand what is actually happening in this line.
  I thought you couldn't instantiated? </p>
  
  <p>Maybe I'm not making sense, but please tell me we're I'm going off the track.</p>