Why compiler gives me error when I call object MyObject ?
public class ThisIsClass
{
public static void main(String[] args)
{
MyObject loan = new MyObject(); //error should be ThisIsClass loan = new ThisIsClass();
System.out.println(loan.toString());
}
}
It works fine when I change name of my class to MyObject or change object name?
Why I can't use object on my own name ?
Thanks for quick explanation