Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8320105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T22:32:38+00:00 2026-06-08T22:32:38+00:00

I am reading a book that is on android but brushes over some java

  • 0

I am reading a book that is on android but brushes over some java stuff in a minibook. I already read a book on Java and am aware of interfaces. The books says

The interface-implementing hierarchy (if you can call it a
“hierarchy”) cuts across the class-extension hierarchy. This idea is
illustrated in Figure 4-1, where I display class extensions vertically
and display interface implementations horizontally. (Android’s
KeyboardView class lives in the android.inputmethod service package.
Both KeyboardView and the homegrown MyListener class in Listing 4-3
implement Android’s OnClickListener interface.)

Interface Cutting Across Classs Heirarchy

Burd, Barry (2011-11-14). Android Application Development All-in-One
For Dummies (p. 197). John Wiley and Sons. Kindle Edition.

Does the “cutting accross class hierchy” just mean that sibling classes both extend the interface… I don’t get what more are they pointing out with this diagram and saying it cuts across horizantly the class vertical heirchy in diagram 4-3… Please explain if there is special concepts deeper than what I got out of it…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T22:32:41+00:00Added an answer on June 8, 2026 at 10:32 pm

    Both the MyListener and the KeyboardView-classes implement the OnClickListener-interface. That makes both of those classes OnClickListeners.

    The idea is the following: Every class derives from a base-class (Object being the most basic class available). That makes every class an Object. Thinking in terms of OOP, the most abstract thing you can say about something is, that it is an object.

    Getting back to the interfaces, let’s assume you have two interfaces, Singer and Writer. A person can be a singer, and a person can be a writer. But he/she can also be both.

    Implementing Singer and/or Writer tells you more about an object. Some code:

    class Guy implements Singer, Writer{
      // Empty
    }
    Guy chris = new Guy();
    
    hireWriter(chris); // Accepts "Writer" as it's parameter
    hireSinger(chris); // Accepts "Singer" as it's parameter
    

    By implementing the interfaces, you’re telling your code that this object is:

    1. An Object
    2. A Singer
    3. A Writer

    This “cut’s through the class hierarchy” by providing more information about a class by not deriving from more classes, but by implementing interfaces.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am reading some book and I have encountered a piece of code that
I am reading a book about Java and it says that you can declare
Reading some book that said the servlet is singleton from the container side. Is
I am reading a book that compares two ways of implementing threads, Middleware Threads
I'm reading a book that recommends clicking a check box that says Place code
I am reading a book saying that in C++ you can't do this: int
I'm reading a book about SQL. In that book, I saw strange query below:
I'm reading a book about SQL. In that book there's the term Ad Hoc
I am reading WCF book.It states that the client can consume service running on
I'm reading a book about DI that always talks about DI frameworks instantiating an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.