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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T18:04:52+00:00 2026-05-30T18:04:52+00:00

What is the difference between extends and implements in java with respect to performance

  • 0

What is the difference between extends and implements in java with respect to performance and memory,etc.
For example take the following scenarios,

1)

public interface PrintResult
{
  public final int NO_ERROR=0;
  public final int SUCCESS=1;
  public final int FAILED=-1;
}


public class PrintProcess implements PrintResult
{
  //Perform some operation
}



2)

public class PrintResult
{
  public final int NO_ERROR=0;
  public final int SUCCESS=1;
  public final int FAILED=-1;
}


public class PrintProcess extends PrintResult
{
  //Perform some operation
}

For above scenarios (1,2) what is difference between using extends (deriving child class), implements (implementing interface). with respect to performance,memory,etc. ?

  • 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-30T18:04:54+00:00Added an answer on May 30, 2026 at 6:04 pm

    During a memorable Q&A session, someone asked James Gosling (Java’s inventor): If you could do Java over again, what would you change? . I’d leave out classes, he replied

    Java does not allow you to extend multiple classes. This avoids some problems related to multiple inheritance. However you can choose to implement multiple interfaces. This is a huge plus.

    Some people also believe extends decreases the flexibility of their code.

    However, I doubt there is any huge difference in performance, efficiency etc. In fact, they might even produce the same byte-code ( though I’m not sure ). And you are comparing two different things that have different functions, its like asking if Apples are more efficient than Oranges.

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

Sidebar

Related Questions

What's the difference between the following keywords in Java: implements , extends ?
What is the difference between the following 2 method signature: public <T extends MyClass>
Say A is an interface. What is the difference between public <T extends A>
Is there any difference between public class Controller1 extends AbstractController { @Override protected ModelAndView
What is the difference between two codes? Extends; <?php require_once 'example.class.php'; Class First extends
What is the difference between this method declaration: public static <E extends Number> List<E>
What is the difference between <? super E> and <? extends E> ? For
Is there any difference between List<Map<String, String>> and List<? extends Map<String, String>> ? If
What is difference between in the following statements String name = Tiger; final String
If we have: public interface Foo{} public class Bar implements Foo{...} Is there a

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.