Hi,
In this eg. if I try invoking the sum() as sum(10,10); it throws a compiler error that methods are ambiguous.
Though you cld invoke with sum(10,10L) etc.. so this wont be a problem.
But then is this a good eg. to test for overloading?
Thanks.
About Question enthuware.ocajp.i.v7.2.1340 :
Moderator: admin
-
- Site Admin
- Posts: 10386
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.1340 :
It is definitely overloading. But I wouldn't call it a good coding practice.
HTH,
Paul.
HTH,
Paul.
Who is online
Users browsing this forum: Bing [Bot] and 8 guests