Java : The import collides with another import statement

后端 未结 3 773
面向向阳花
面向向阳花 2021-02-02 10:41

I have imported an Existing Java Application into my Workspace . I see that , a class with same name is present in different packages with in the Application.

For exampl

3条回答
  •  抹茶落季
    2021-02-02 11:18

    Directly apply full Class Names wherever applicable. Eg-

    public class SomeClass {
    
    public someMethod() {
    
    com.myapp.someotherpackage.Status = "something";
    
    com.some.other.package.Status = "otherthing";
    
    if(com.myapp.someotherpackage.Status == com.some.other.package.Status) {
    
    }
    ....
    }
    }
    

提交回复
热议问题