I created a class with name Object in a package java.lang. In some another package I created Main class. Now in main method of Main class when I write new Main() and put a dot after that I don't see equals(), wait() etc.. i.e methods of actual Object class.
My question is don't you think creating an class with name Object(specially with java.lang package) should not be allowed. As Object class is by default inherited by all classes so in my case whatever class I define will automatically inherit my class instead of actual object class because class name and package name of my object class is same as that of actual object class.