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

  • Home
  • SEARCH
  • 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 1105819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T01:41:41+00:00 2026-05-17T01:41:41+00:00

Possible Duplicates: Abstract classes vs Interfaces Abstract class and Interface class? Hi All, I

  • 0

Possible Duplicates:
Abstract classes vs Interfaces
Abstract class and Interface class?

Hi All,
I have little bit confusion about the use of the abstract class and Interface,
when we need to Implement abstract class and when Interface.

Thanks
Vijendra Singh

  • 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-17T01:41:42+00:00Added an answer on May 17, 2026 at 1:41 am

    In general:

    Interfaces should be used in any situation where what’s important is what the class does, not necessarily what it is. A class that can, for instance, create a copy of itself can do many other things besides, but when you only care about being able to copy the object, you only care that the object implements ICloneable. Also, interfaces are useful when the implementation of a set of functionality is not shared; the ability to output the results of a calculation, for instance, may be in the form of a file, or the console, or over the network. These three implementations are totally different, but they can all look the same to a class that needs an IOutputWriter.

    Abstracts are generally used to share code. An abstract class, unlike an interface, can specify method logic that its children can use. A BitmapImagePrinter works specifically with a Bitmap file type, but it needs the same logic as a JpegImagePrinter to actually access the printer; so, that logic can go in AbstractImagePrinter. Abstracts are also useful when what a class is is more important than what it does. CheckingAccount and SavingsAccount are both BankAccounts, even though they behave differently.

    There are some other special cases where you MUST use one or the other, but on the whole, that’s the major difference.

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

Sidebar

Related Questions

Possible Duplicates: interface and abstract class. Abstract classes vs Interfaces Can anyone tell me
Possible Duplicates: Abstract class and Interface class? Java: interface / abstract classes / abstract
Possible Duplicates: Interface vs Base class Interface or abstract class? Hi All, I am
Possible Duplicate: Why are interfaces preferred to abstract classes? Abstract class and Interface class?
Possible Duplicate: Interface vs Abstract Class (general OO) When to use abstract class or
Possible Duplicate: When to use interfaces or abstract classes? When to use both? Consider
Possible Duplicate: Use of Java [Interfaces / Abstract classes] What's the benefit of interfaces
Possible Duplicate: When to use abstract class or interface? I am a newbie in
Possible Duplicate: When to use an interface instead of an abstract class and vice
Possible Duplicate: When to use virtual destructors? let's say i have an abstract class

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.