sureshkumar settu wrote:i am calling like getData("suresh")
Always it uses varargs method i.e first method. Why i am not able to call second one?
Seems odd to me. However, what you could try is swapping the methods around (ie, put the single String method first); I'm pretty certain that when the compiler can't make any clear choice it uses the definition order.
Bats fly at night, 'cause they aren't we. And if we tried, we'd hit a tree -- Ogden Nash (or should've been).
Articles by Winston can be found here