Timeline for Why does Java allow to implement different interfaces, each containing a method with the same signature?
Current License: CC BY-SA 3.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Dec 3, 2012 at 22:26 | comment | added | K.Steff | @SoftwareEngeneeringLearner Sorry, my bad here. You are correct and your question makes more sense now, but I really think you should either rephrase, or even better, ask a new question about this, specifying the differing return types. Having two methods with the same signature, but different return types (IMO) can be an issue. | |
| Dec 3, 2012 at 11:44 | comment | added | dhblah | "Definition: Two of the components of a method declaration comprise the method signature—the method's name and the parameter types." from here: docs.oracle.com/javase/tutorial/java/javaOO/methods.html - so it includes method name and number and types of parameters, no return type unfortunately/fortunately (there is a whole different question on this). | |
| Dec 3, 2012 at 3:34 | comment | added | K.Steff | @SoftwareEngeneeringLearner In Java method signature includes return type | |
| Dec 2, 2012 at 21:20 | comment | added | dhblah | Thank for your reply, but in case when there is two interfaces with two methods with the same signature but different return type, you couldn't implement bot of them. And nobody couldn't predict that. | |
| Nov 28, 2012 at 11:56 | history | edited | K.Steff | CC BY-SA 3.0 |
added 342 characters in body
|
| Nov 28, 2012 at 11:50 | history | answered | K.Steff | CC BY-SA 3.0 |