about same class names and interface names in a package
<p>I am little bit confused of classes names.This is my problem ...i tried to give same class name in two different files and in the same package with default access modifier and even i tried with interfaces even then it is not showing any errors.i want to how they are actually accessed.</p>

<p>i dont understand how these classes are interface will be used...whether a class in a file checks for presence of class or interface (if it want to use ) first in local file and then check in outside with in the package or any thing else.i am not getting any clarity.If any one understand the trouble what i am facing,i hope will help me.....
// This is InterfaceTest</p>

<pre><code>package Practice;

interface t{
public void h();
public void h1();
}

abstract class InterfaceTest implements t{
public void h(){

}
public void h1(){

}
public abstract void t();
}
</code></pre>

<p>//This is other file InterfaceTest1</p>

<pre><code>package Practice;
interface t{
public void h();
public void h2();
}
public class InterfaceTest1 {
}
</code></pre>

<p>//This is TestStack file</p>

<pre><code>package Practice;

public class TestStack {
Test t=new Test();
public static void main(String[] args){
    TestStack t1=new TestStack();
    InterfaceTest it=new InterfaceTest();
}
}
interface t{
public void h3();
}
class Test implements t{
public void h3(){

}

public void h1(){

}
public void h2(){

}
}
class InterfaceTest{

}
</code></pre>

<p>These three files used in the same package but i am not getting any errors in name collision</p>
