Article View: borland.public.jbuilder.java.api
Article #2026When to use interfaces in OOP
From: Dick Gerrits
Date: Wed, 27 Jun 2001 11:44
Date: Wed, 27 Jun 2001 11:44
28 lines
1704 bytes
1704 bytes
Hello, I am new in JAVA/OOP and have a question about using interfaces. When do you have to use interfaces? I read some information about the use of interfaces in JAVA/OOP, but I don't understand the advantage/strength of interfaces. Is the ONLY advantage of interfaces having a set of methods (including a list of parameters) which you can use (inherit) for different object/classes? An interface does not have any implementation, so you have always write implementation code in the class which implements an interface !! That's what I understand about interfaces. But till now I don't really understand the power/strength of interfaces in OOP design. The only advantage I see is that you have always the same methodNAMES and parameterLIST when using interfaces ! Please, can anyone tell me more about it ? Thank you in advance for your reply. Witte van Moort B.V. Dick Gerrits -0-0-0-0-0-0-
Technical Details
Message-ID:
<3b39c705_1@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnewsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,a43ea4662650fd72,start X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2001-06-27 04:46:14 PST From: "Dick Gerrits" <dgerrits@wvm.nl> Newsgroups: borland.public.jbuilder.java.api Subject: When to use interfaces in OOP Date: Wed, 27 Jun 2001 13:44:56 +0200 Lines: 30 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 NNTP-Posting-Host: 213.116.98.199 Message-ID: <3b39c705_1@dnews> X-Trace: dnews 993642245 213.116.98.199 (27 Jun 2001 04:44:05 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews