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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T06:31:54+00:00 2026-06-09T06:31:54+00:00

I have a question: In Java, I have a class Fresher, which extends Employee

  • 0

I have a question:
In Java, I have a class Fresher, which extends Employee and implements an interface IFresher. Please refer the code below.

public interface IFresher {
        // Some other stuff
    public void takeCall();
}



public class Employee extends Human {
        // Some other stuff
    public abstract void takeCall()
       {
          // Some basic implementation
       }

}

class  Fresher extends Employee implements IFresher
{
        @Override
    public void takeCall() {

    }
}

Question: Which takeCall() method gets implemented in the Fresher sub class, is it from interface or the super class,
What is order of hierarchy followed in such cases when there is a conflict between the super class and the interface?

  • 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-09T06:31:56+00:00Added an answer on June 9, 2026 at 6:31 am

    There is never any conflict in this case – since interfaces don’t contain implementations, there can only ever be one (superclass) implementation to inherit from.

    Fresher will inherit implementation from Employee (in this case overriding the takeCall method). But it will also successfully implement IFresher as it has a function with the correct signature.

    (Aside: this is the main reason why multiple implementation inheritance is disallowed in Java, it gets very tricky to define how it should all work)

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

Sidebar

Related Questions

I have a question about Java Generics. In code below we have interface B
I have a question about best practices in Java. I'm writing a class, which
I have a short question i have wrote this in java. Old code: class
My Question is: I have a test.java class which is the main class. There
I have a quick question about Java synchronization. Please assume the following code: public
I have a quick question about Java synchronization. Please assume the following code: public
I have a quite simple question: I want to have a Java Class, which
I had a question about Java Class Path variables. If I have multiple jars
I have a question about how GC works in Java. Consider the following code:
I have a question about the compliance mode. What happens with my class which

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.