TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Proportional Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Stephen Schwarm <[log in to unmask]>
Reply To:
Date:
Tue, 6 Feb 2001 13:03:46 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (34 lines)
"Alexandre E. Kopilovitch" wrote:
>
> >>>The only thing Java added
> >>>to C++ was a little bit of (not nearly enough) error-resistance.
> >
> >>interfaces
> >
> >So what is the difference between a Java Interface and a C++ pure virtual class
> >(apart from the C++ version being less restrictive)?
>
> Well, consider the following declaration:
>
>   public class GentleThread implements Runnable {
>     ...
>     }
>
> How do you say that in C++ ? I.e., what in C++ corresponds to "implements" ?
>
> Alexander Kopilovitch                      [log in to unmask]
> Saint-Petersburg
> Russia

Java does not support multiple inheritance so the is how it specifies
common interface specifications.

To answer your question directly:

class GentleThread: public class Runnable

Where Runnable has only abstract interfaces.

Steve Schwarm
EMC Corp

ATOM RSS1 RSS2