Neha Daga wrote:can you please tell me clearly whats your question?
sorry,i was wrong,Even if both methods are commented, compiler gives error only when new instance of Class Main is created.
Otherwise, it compiles fine.
i was trying to be oversmart.
Trivikram Kamat wrote:
Even if both methods are commented, compiler gives error only when new instance of Class Main is created.
Otherwise, it compiles fine.
May be compiler comes across the ambiguity only when method or constructor is called.
yes you are right compiler gives error only when new instance of Class Main is created,othervise it compiles fine.
i don't know what i was thinking when i asked this question.
thanks both of you for the reply.