Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Pedro Gilbert   on Jul 23 In Java Category.

  
Question Answered By: Liam Bouchard   on Jul 23

Infact we frequently do it. ie Categorize the global constants and
define them in various interface; then implement those interfaces
for the classes  that need the respective constants. In this way,
the interfaces  do not need to have any empty  method.

One possible difference is that a class  can extend only one abstract
classes whereas it can implement more than one interface. ie Java
doesnt support multiple inheritance (C++ does it by allowing a class
to extend more than one class)

Share: 

 
 
Didn't find what you were looking for? Find more on Interfaces & Abstract classes Or get search suggestion and latest updates.


Tagged: