Content deleted Content added
→Extending interfaces: new section |
Tag: |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 1:
{{WikiProject
{{WikiProject Java|importance=mid}}
}}
== Interfaces and Abstract Classes ==
Line 66 ⟶ 68:
Am I right that a concrete class cannot add any new public methods if it is only implementing interfaces and does not have an "extends" relationship with a superclass? It seems to compile but will not expose the method to calling classes. -- [[User:Beland|Beland]] ([[User talk:Beland|talk]]) 19:01, 24 July 2013 (UTC)
== Concrete Methods for Interfaces(Defender methods) ==
Java 8 is redefining interfaces by allowing them to implement concrete methods: http://www.javabeat.net/virtual-extension-methods-in-java-8/
I think it should be added to this page in a special java 8 section, here's the official oracle link: http://www.oracle.com/technetwork/articles/java/lambda-1984522.html <span style="font-size: smaller;" class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/117.194.255.24|117.194.255.24]] ([[User talk:117.194.255.24|talk]]) 18:33, 30 January 2014 (UTC)</span><!-- Template:Unsigned IP --> <!--Autosigned by SineBot-->
== Rework into a non Java-specific 'Interface type' article? ==
I've had an idea regarding the proposed merge into the [[Protocol (object-oriented programming)]] article, and [https://en.wikipedia.org/wiki/Talk:Protocol_(object-oriented_programming)#c-HotMess-20221114130000-3mi1y-20221107072700 I've already mentioned it on the relevant threads regarding that proposal], but I figured I should mention it on the talk page for this article as well, seeing as that plan involves this article as well.
In short, reworking this article to be about Interface types in general, rather than specifically about Java's <code>interface</code>s. Along the same lines as [[Enumerated type]], [[Function type]], [[Abstract type]], etc. After all, Java's interfaces by themselves probably aren't notable enough for an article of their own (as per [[WP:NOPAGE]]), but, reworking this article to be primarily about interface types/language equivalents (with small sections specifically on Java/C#/TypeScript/Golang's <code>interface</code>s, Python's <code>Protocol</code>, Rust's <code>trait</code>s, etc) would probably be more appropriate.
I'm going to refrain from making any major changes pending the outcome of the merge/move discussions over on [[Talk:Protocol (object-oriented programming)]], but I figured I should at least mention it here in advance, whilst I'm thinking about it. [[User:HotMess|<big>🔥</big><b style="color:red;">HOT<i style="color:orange;">m̵̟͆e̷̜̓s̵̼̊s̸̜̃</i></b><big>🔥</big>]] ([[User_talk:HotMess|talk]]・[[Special:Contributions/HotMess|edits]]) 13:27, 14 November 2022 (UTC)
|