Talk:Interface (Java)

message: Is it possible for an Interface to implement other interface or extend an abstract class?
:No.  An interface can extend other interfaces (similar to a class implementing interfaces), but it can't implement other interfaces.  Semantically this is because interfaces don't contain an implementation, although syntactically, an interface extending other interfaces is the same as a class implementing interfaces, in that each allows the class/interface to inherit from and assume the types of one or more interfaces.  An interface can not extend an abstract class because although the class is declared as abstract, the class can contain an implemention (or partial implementation), and by definition, an interface is not allowed to contain any implementation.
:Hope that helps. —Doug Bell talk•contrib 06:38, 10 November 2006 (UTC)
thread_title:  Interfaces and Abstract Classes 

message: There are identical interfaces in C#. exe 15:31, 27 August 2007 (UTC)
replies: text: Not just C#, but just about in any OOP language; there is no reason this article should document just one language. However, the merge with Protocol (object-oriented programming) was opposed, go figure. -- intgr #%@! 07:31, 28 August 2007 (UTC)
replies: text:  The Protocol (object-oriented programming) article is both more general and more succinct than this one, and it would suffer from having all the details in this article merged into it. On the other hand, the details in this article are probably of interest to Java developers and it would be unfortunate to lose them in a merge. In addition, it would probably be confusing to have what is called an Interface in Java described using the more exact term Protocol, and even more confusing to have Protocols described as Interfaces when that term means something quite different in most object-oriented languages. This being said, I don't see why this article doesn't link to the Protocol (object-oriented programming) one (and vice versa).173.226.146.65 (talk) 00:32, 24 February 2011 (UTC)

text: The C# interfaces were copied from Java.  They can be documented in the appropriate article. Mike0001 (talk) 12:45, 21 February 2008 (UTC)
thread_title: C#

message: Hi, I have re-worded parts of this, hope everyone approves of the new version. It needs an example of interfaces with embedded classes and interfaces.  Can anyone think of examples to fit the existing ones? Mike0001 (talk) 12:20, 22 February 2008 (UTC)
thread_title:  Rewording 

message: The example in the Examples section doesn't demonstrate the usefulness of an interface... now it's a pretty awkward construction to let a monster roar, but that shows nothing.. it doesn't show that an interface can be used to implement a level of abstraction in an application. - Simeon (talk) 11:17, 1 July 2008 (UTC)
replies: text: I've removed it for now. - Simeon (talk) 11:20, 1 July 2008 (UTC)
thread_title:  Examples 

message: As someone who is trying to figure out what an 'interface,' (the Java kind,) is, the first sentence of this article was extremely frustrating, because it uses the word 'interface' a million times.  I know that it explicitly differentiates 'generic' interfaces from the actually programming construct, but it would be nice if the article used different english words to refer to the different concepts, instead of awkwardly using the same word over and over.  And another thing, when it links me to what an 'interface,' is (the Computer Science kind,) I don't think that article describes the desired kind of interface: We're not talking about GUIs (user interfaces) nor interfaces to hardware.
—Preceding unsigned comment added by 128.233.135.237 (talk) 21:26, 23 July 2010 (UTC)
thread_title:  Comment about Introduction 

message: Would it be appropriate to include information about how a generic class uses the "extends" keyword when inheriting from a base class AND multiple interfaces?  For a refernce of what I am speaking of, view: http://stackoverflow.com/questions/4258447/what-does-the-java-compiler-do-with-multiple-generic-bounds . 64.55.132.4 (talk) 18:49, 2 July 2012 (UTC)
thread_title:  Generics "extends" interface 

message: 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. -- Beland (talk) 19:01, 24 July 2013 (UTC)
thread_title:  Extending interfaces 

message: 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  — Preceding unsigned comment added by 117.194.255.24 (talk) 18:33, 30 January 2014 (UTC)
thread_title:  Concrete Methods for Interfaces(Defender methods) 

message: I've had an idea regarding the proposed merge into the Protocol (object-oriented programming) article, and 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 interfaces. 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 interfaces, Python's Protocol, Rust's traits, 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. 🔥HOTm̵̟͆e̷̜̓s̵̼̊s̸̜̃🔥 (talk・edits) 13:27, 14 November 2022 (UTC)
thread_title:  Rework into a non Java-specific 'Interface type' article?