Confusion with a class level and instance level
<p>I have the following class:</p>

<pre><code>public class B {

    public void print() {
    }

    public static void main(String[] args) {
        B B = new B();
        B.print();
    }

}
</code></pre>

<p>I was wondering why the compiler didn't give an error saying it's not a static method. How will it distinguish between the class level and instance level when we have the object with the same as the class?</p>
