In my project I have a shapes
package which has shapes I designed for my graphics program e.g Rectangle, Circle. I also have one or two more packages that have the
Another alternative is to type the fully qualified class name as you need it. In my example, there are 2 Element
object, one created by me org.opensearch.Element
and the other org.w3c.dom.Element
.
To resolve name conflict, as well as to minimize import "clutters", I've done this (in my org.opensearch.Element
class):
public org.w3c.dom.Element toElement(org.w3c.dom.Document doc) { /* .... */ }
As you can see, the return Element
type is fully-typed (i.e. I've specified the fully-qualifed class name of Element
).
Problem solved! :-)