title: Classes from different packages with identical names
body: <p>I have to deal with both HTML and XML data. It's not really something that'd break my neck, but there are name ambiguities between JDOM and JSoup (for example, the Document and Element classes) and writing the full qualified names over and over again (which would be the way to go according to the <a href="http://docs.oracle.com/javase/tutorial/java/package/usepkgs.html" rel="nofollow">Java Tutorials</a>) simply means a lot of writing. Do you have any idea how to avoid the full qualified names in this case without moving the JDomClass and JSoupClass classes to their own files?</p>
  
  <pre><code>import java.io.IOException;
  
  public class Imports {
    // ...
  }
  
  class JDomClass {
    JDomClass() throws org.jdom2.JDOMException, IOException {
      org.jdom2.Document doc =
          ew org.jdom2.input.SAXBuilder().build("http://www.example.com/");
      // ...
    }
  }
  
  class JSoupClass {
    JSoupClass() throws IOException {
      org.jsoup.nodes.Document doc =
          org.jsoup.Jsoup.connect("http://www.example.com/").get();
      // ...
    }
  }
  </code></pre>