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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:03:43+00:00 2026-05-27T14:03:43+00:00

I am reading the book The Java Programming Language . In the chapter which

  • 0

I am reading the book The Java Programming Language. In the chapter which explains overriding method, it says:

Making an override method (in subclass) less accessible than it was in super class would violate the contract of the superclass …

The text as a whole is understandable. My only question is what is contract of the superclass? What does the contract mean for a Java class?

  • 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-27T14:03:44+00:00Added an answer on May 27, 2026 at 2:03 pm

    A contract in in a Java class is similar to a contract in the real world – In non-technical terms:

    It’s an agreement that the class will expose certain methods, certain properties, and certain behaviors.

    More technical, from here: (bold added by me)

    Wouldn’t it be nice if all Java classes that you use, including your
    own, lived up to their promises? In fact, wouldn’t it be nice if you
    actually knew exactly what a given class promises? If you agree, read
    on […]

    Design by Contract

    The Design by Contract (DBC) software development technique ensures
    high-quality software by guaranteeing that every component of a system
    lives up to its expectations. As a developer using DBC, you specify
    component contracts as part of the component’s interface. The contract
    specifies what that component expects of clients and what clients can
    expect of it.

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

Sidebar

Related Questions

I am reading up on multi-threaded programming in Java. In the java book it
I'm new to Java but not to programming. I'm reading the book Beginning Android
I am reading Java Thread Programming a book by Paul Hyde .I am into
I'm reading the Book Java Concurrency in Practice . In chapter 15, they are
I am reading a book about Java and it says that you can declare
I'm reading Beginning Java Game Programming 2/e and the book heavily emphasizes using AffineTransform.
I've been reading up on Doug Lea's 'Concurrency Programming in Java' book. As you
I'm reading the Effective Java book by Joshua Bloch. In the first chapter, he
I just started reading a Java book and wondered; which access specifier is the
I'm reading a book about java. It just got to explaining how you create

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.