|
-
Sep 8th, 2001, 01:12 PM
#2
Dazed Member
I think you would use an Abstract class not really as an alternative to an interface(but you could if you wanted to) but to create a generalization. Then you would extend or (subclass) to create an more specific class. it's a little wierd because a class is a model of an abstraction that provides properties and behaviors
for the objects that represent the abstraction. So in reality a class is an abstraction too.
Java does not support multiple class inheritance. Languages such as C++ support multiple class inheritance and this often leads to alot of complexity in the language. I dont like C++ but that is just my opinion. . The class relationships in Java are linear, ruling out multiple implementation inheritance(meaning a subclass inheriting from more than one supper class.) So what Java provides is interfaces which not only allow new type names to be introduced and used polymorphically but also to permit multiple interface inheritance.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|