23.11.2014 Views

Data Structures and Algorithms in Java[1].pdf - Fulvio Frisone

Data Structures and Algorithms in Java[1].pdf - Fulvio Frisone

Data Structures and Algorithms in Java[1].pdf - Fulvio Frisone

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The class BoxedItem shows another feature of classes <strong>and</strong> <strong>in</strong>terfaces <strong>in</strong> <strong>Java</strong>, as<br />

well—a class can implement multiple <strong>in</strong>terfaces—which allows us a great deal of<br />

flexibility when def<strong>in</strong><strong>in</strong>g classes that should conform to multiple APIs. For, while a<br />

class <strong>in</strong> <strong>Java</strong> can extend only one other class, it can nevertheless implement many<br />

<strong>in</strong>terfaces.<br />

2.4.2 Multiple Inheritance <strong>in</strong> Interfaces<br />

119

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!