Basic HTML version of Foils prepared 18 May 97

Foil 69 More on Interfaces -- Why use them

From Java Tutorial - Spring 1997 Part II: Java Language and Object-Oriented Concepts Peking Tutorial, Web Certificate -- Spring-Summer 1997. by Nancy J. McCracken,Geoffrey C. Fox


1 Note that Interfaces often play a software engineering as opposed to required functional role
2 Note that Interfaces are not significantly used in current Java release where perhaps there are 15 times as many class definitions as interface definitions
3 Two examples are Runnable and Cloneable both of which extend Object class -- note interfaces like classes can extend existing classes.
4 The Runnable Interface has one method run() which must always be overwritten and is used to indicate that class with this interface can use threads without being a subclass of Thread. Applets must use Runnable if they need explicit threads because they explicitly are a subclass of panel and as no multiple inheritance, one cannot be a subclass of two classes

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Thu Jan 8 1998