In Python you can do a:
from a import b as c
How would you do this in Java, as I have two imports that are clashing.
In Python you can do a:
from a import b as c
How would you do this in Java, as I have two imports that are clashing.
You can't import two classes with the same name and use them unqualified, and there is no such aliasing mechanism in Java.
Import one and use the other one by specifying a fully-qualified named. I.e.
private ClassName obj1 = null;
private com.yourpackage.second.ClassName obj2 = null;
Java doesn't allow you to do that. You'll need to refer to one of the classes by its fully qualified name and only import the other one.