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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T15:21:33+00:00 2026-06-10T15:21:33+00:00

Stimulated by the question Interface vs Abstract Classes and the accepted answer, I would

  • 0

Stimulated by the question Interface vs Abstract Classes and the accepted answer, I would like to have a more detailed and clarified answer. In particular I cannot understand the statement “a field in an interface is implicitly static and final”. Does it mean that a class A implementing an interface containing method foo() can invoke the method as A.foo()?

What concerning final: As long as interfaces contain only methods, given an abstract class A which implements an interface with a method foo() and an ordinary class B which extends the abstract class A, cannot the class B override the foo method? As far as I am concerned, final methods are impossible to be overridden. What is true finally?

  • 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-10T15:21:35+00:00Added an answer on June 10, 2026 at 3:21 pm

    “a field in an interface is implicitly static and final”.

    In an interface writing

    int N = 1;
    public int N = 1;
    static int N = 1;
    public static int N = 1;
    // also
    final int N = 1;
    public final int N = 1;
    static final int N = 1;
    public static final int N = 1;
    

    are all the same.

    Does it mean that a class A implementing an interface containing method foo() can invoke the method as A.foo()

    Fields and method are both members, but methods and fields are not the same thing.

    Methods in an interface cannot be static or final, but are implicitly public and abstract

    int foo();
    public int foo();
    abstract int foo();
    public abstract int foo();
    

    are all the same for an interface.

    As far as I am concerned, final methods are impossible to be overridden

    final instances methods cannot be overridden and final static methods cannot be hidden.

    Similarly nested interfaces, classes and annotations are public and static. Nested interfaces and annotations are also implicitly abstract.

    interface A {
        public static class C { }
        public static /* final */ enum E {; }
        public static abstract interface I { }
        public static abstract @interface A { }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to pose this question as long as I am trying currently
As the question states, I would mainly like to know whether or not my
I have a simple question. I use a singleton which implements an abstract class.
In interview I have been asked following question. I tried to answer the question
i have just been introduced to simulated annealing and would like to understand it
I have a question considering a program that stimulates a stack (not using any
This question goes beoynd just programming, but I'd like to get some input on
I have a question about Clozure CL. While I was trying to quickload a
I would like to know which method should I choose when trying to create
i have a question regarding the refreshment of an imageview. Basically, I have 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.