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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:04:01+00:00 2026-06-01T17:04:01+00:00

public interface GroupedInterface extends Interface1, Interface2, Interface3 { // constant declarations // base of

  • 0
public interface GroupedInterface extends Interface1, Interface2, Interface3 {

    // constant declarations

    // base of natural logarithms
    double E = 2.718282;

    // method signatures
    void doSomething (int i, double x);
    int doSomethingElse(String s);
}

(I’m studying from oracle’s site.This is from there.)It’s an interface definition and but we assign a number to E of type double. Is it possible all variables can declare x,y,z of type int and then assign some number to them (is it constant declaration or constant declaration is what? )?? Does E have special condition or etc. in the above code??

  • 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-01T17:04:02+00:00Added an answer on June 1, 2026 at 5:04 pm

    Variable declared in an interface are static and final by default, and are allowed. So you can set an initial value for the variables but not change them.

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

Sidebar

Related Questions

public Interface Foo<T extends Colors>{...} Is there a way to retrieve which T was
I have interface: public interface CartService extends RemoteService{ <T extends ActionResponse> T execute(Action<T> action);
Given the interface: public interface BasedOnOther<T, U extends BasedList<T>> { public T getOther(); public
From the javadocs : public interface Cache<K,V> extends Function<K,V> { //... void invalidate(Object key);
Here's an interface: public interface Foo<T> extends Comparable<Foo<T>> { ... } And there are
public interface LoginService extends RemoteService { public static final String SERVICE_URI = /login; public
public interface IPowerList<T> extends Iterable< T > { public int bitFlag(List<T> subseq); } public
Here is my problem: public interface Containter extends ModelElement{ List<? extends ModelElement> getChildren(); }
Consider this code: public interface Foo extends Comparable<Foo> {} public enum FooImpl implements Foo
why does public interface ArrayOfONEITEMInterface <T extends ONEITEMInterface>{ public List<T> getONEITEM(); } compile, but

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.