This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
hi, iam implementing the concept of method overloading in java class but not able to succeed b'coz it is keep on saying that
'sendPrListToScreen' is undefined for the type 'service class name'.
But as per my knowledge it is defined.
But when i use two different names of this method declared above then it works perfectly but iam not able to use the cream of Core Java.
Vinod Kumar Nair
"Any fool can write code that a computer can understan. Good programmers write code that humans can understand."
What you're describing and what you've shown aren't adding up, for me. The problem is your use of Generics. As far as the compiler is concerned during this sweep, the 2 methods are the same. You should be getting an error about duplicate method names. Something along the lines of:
name clash: sendPrListToScreen(List<PrDraftHeader> prDraftList) and sendPrListToScreen(List<PurchaseRequestHeader> prList) have the same erasure
Also, an administrative note. Please use real words. Because instead of b'coz. We have a lot of users who's first language isn't English. By using words like b'coz it just makes it more difficult to communicate.