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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T21:08:05+00:00 2026-05-17T21:08:05+00:00

Does some interface like below already exist in Java? interface Size { int getWidth();

  • 0

Does some interface like below already exist in Java?

interface Size {
    int getWidth();
    int getHeight();
}

Edit: It must be an 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-05-17T21:08:05+00:00Added an answer on May 17, 2026 at 9:08 pm

    I’d recommend making your own rather than using java.awt.Dimension, particularly if what you want is an interface and not a class. If you do want a class like Dimension, I still wouldn’t use it, but instead make another class as an immutable value type… Dimension‘s mutability is a major weakness. Every method that returns a Dimension is forced to return a copy of it, and every method that accepts a Dimension is forced to make a copy of it too. Had it been immutable, copying wouldn’t have been required in either case.

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

Sidebar

Related Questions

Objective-C has directives like: @interface @implementation @end @protocol @property @synthesize I think of these
I currently am part of a project where there is an interface like this:
I have a java threads related question. To take a very simple example, lets
I have a number of UserControls that I want to each have some basic
In the below hierarchy, is there a way at compile-time to exclude IBars while
I have heard about things like "C Runtime", "Visual C++ 2008 Runtime", ".NET Common
I've been working on a project using OpenCV for a while, and am ready
We're running SharePoint 2007 on a small farm. One department in our company has
I have an iPhone application which is, in essence, a list. There is 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.