Pardon me,but I have a silly question to ask.
Is there any difference in invoking a method from a reference variable,and invoking it explicitly by the object itself,i.e new ClassName().methodName();
Sathiesh Kumar Vs
posted 6 years ago
A a = new A();
Both are same in terms of method invocation. Only difference is in the first case you still have the reference of the created object but in the second you don't have.