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 3781878
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T11:00:16+00:00 2026-05-19T11:00:16+00:00

i have read some lines from somewhere but i cant understand the meaning of

  • 0

i have read some lines from somewhere but i cant understand the meaning of this line clearly .. i dont know why i cant understand. I know the difference between this two very well.. But plz help me .. and explain that what it does mean… ?

In design, you want the base class to present only an interface for its
derived classes. This means, you don’t
want anyone to actually instantiate an
object of the base class. You only
want to upcast to it (implicit
upcasting, which gives you polymorphic
behaviour), so that its interface can
be used. This is accomplished by
making that class abstract using the
abstract keyword. If anyone tries to
make an object of an abstract class,
the compiler prevents it.

Thanks in advance….

  • 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-05-19T11:00:16+00:00Added an answer on May 19, 2026 at 11:00 am
    public abstract class Animal {
      public abstract String speak();
    }
    public class Dog extends Animal {
      public String speak() { return "woof!"; }
    }
    public class Duck extends Animal {
      public String speak() { return "quack!"; }
    }
    
    Animal a = Zoo.getRandomAnimal();
    a.speak();
    

    You want people to refer to animals as Animal, rather than specifically Dog or Duck. That way, if you breed a dog/duck hybrid, and thus a new type of animal is created, they don’t have to go around changing code to deal with this new wonder.

    The interface they are speaking about in your quote is not talking about a Java ‘interface’ but rather ‘a collection of methods you may use to interact with this object’.

    All animals speak, and that’s what important. It’s the interface. Exactly how they speak is an implementation detail.

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

Sidebar

Related Questions

I have read some different responses for this same question, so I dont know
I have some code to read the lines from a file, I would like
I have read some of the questions and answers here, but it none match
I have read some posts about this topic and the answers are comet, reverse
I have read some articles on POCO in the enttity framework but still don't
I have read some threads regarding this and I did already take steps to
In the book Linux System Programming I have read some like this: fgetc returns
I have just switched from svn to mercurial and have read some tutorials about
I'm trying to read each line from a text file using batch. The lines
I just beginning to program in Python. I have read in some records from

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.