here is my code ...
The Test class exists in three packages .. org.iitkan, org.iitkgp and the default package. If i run this program then it runs well. How a class gets looked into the packages?
Here what's happening, first compiler look into the default package if not then ambiguity error flashed(if a class found in two imported different packages)? ;)
Code:
import org.iitkan.*;
import org.iitkgp.*;
public class AnotherTest {
public static void main(String a[]){
System.out.println("Debasis ...!!!!");
Test t = new Test();
}
}
Here what's happening, first compiler look into the default package if not then ambiguity error flashed(if a class found in two imported different packages)? ;)
Comment