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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T07:39:29+00:00 2026-05-21T07:39:29+00:00

I was wondering if the next thing is possible for implementation: Lets say I’ve

  • 0

I was wondering if the next thing is possible for implementation:

Lets say I’ve got 2 interfaces while each one of them has 1 function header.
For example, iterface1 has function g(…) and interface2 has function f(…)

Now, I make a class and declaring that this class is implementing these 2 interfaces.
In the class I try doing the next thing:

I start implementing function g(…) and in it’s implementation I make a local class that implements interface2 and I add to this class the implementation of f(…).

  • 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-21T07:39:30+00:00Added an answer on May 21, 2026 at 7:39 am

    I’m not quite sure what you mean. I am picturing something like this:

    interface Interface1
    {
        public void g();
    }
    
    interface Interface2
    {
        public void f();
    }
    
    class MyClass implements Interface1, Interface2
    {
        @Override
        public void g()
        {
            class InnerClass implements Interface2
            {
                @Override
                public void f()
                {
                }
            }
        }
    }
    

    Is that what you meant?

    In this case, the answer is no. The inner class (InnerClass) works fine, but it doesn’t count as an implementation of f for the outer class. You would still need to implement f in MyClass:

    MyClass.java:11: MyClass is not abstract and does not override abstract method
    f() in Interface2
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Wondering if someone could help me. I have next to no knowledge with Ajax,
i was wondering how i can make my app display that notification number next
I was wondering if someone can help me solve the following problem. Someone has
I was wondering if it would be possible to use jQuery's ajax function to
I was wondering if there is any possible way to call functions in a
I am wondering if it is possible to setup repeating push notifications. The reason
I was wondering whether it's possible to validate a required size for an icon
I wondering if you can help me position two divs, mainContent and sideContent next
I was wondering if it is possible, as my 5 minutes of experimentation proved
I am newbie to javascript. I am just wondering whether is it possible to

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.