Monday, July 27, 2026
Latest:
  • Präsentation für b1
  • Verb “werden” Konjugation
  • In German, verb sein (to be) Konjunktion
  • Wichtige wörter für B1 prüfung
  • What are the main differences between ApplicationContext and BeanFactory?
Upokary

Upokary

Quality information

  • Health
  • Life
  • Fashion
  • Food
  • Code
  • English
  • বাংলা
Technology 

Design and document for inheritance else prohibit it

Published: March 6, 2020 inheritance, Java

When we are designing a class if it is only for internal use and not for extension then we should make the class final. The effective java book has clearly mentioned this line.

The interaction of inherited classes with their parents can be surprising and unpredictable if the paren class wasn’t designed to be inherited from.

Classes should be two kinds :

  • Classes designed to be extended, and with enough documentation to describe how it should be done
  • Classes marked final

https://stackoverflow.com/questions/218744/good-reasons-to-prohibit-inheritance-in-java

You May Also Like

What is useRef in React? What are the use cases of useRef?

August 14, 2021 beroza

What is Hadoop? What are the benefits of using Hadoop?

November 26, 2023 beroza

Babel vs Webpack: What are the differences?

August 27, 2021 beroza

How to redirect to another route onclick ReactJS?

October 23, 2019 beroza

How to horizontally center an element using CSS?

January 25, 2021 beroza

Average Salary Excluding the Minimum and Maximum Salary

May 28, 2023 beroza

How to stop adding, modifying and deleting an object’s properties?

August 7, 2021 beroza

Why we should use ‘use strict’ in JavaScript?

August 13, 2021 beroza

could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket

October 11, 2020 beroza

Why Upokary?

Upokary.com is a useful application in everyday life. It provides very handy information regarding every aspect of life. Each and every tip of upokary.com is meant to make life better.

Upokary tools

  • Youtube thumbnail
  • Youtube video downloader

Useful Links

  • Handy code
  • Technology
  • People
  • Programming
  • Quote
  • Travel
  • WordPress
  • IELTS
  • Kids

Pages

  • Sitemap
  • Privacy policy
  • About us
  • Contact us

Support

For any kind of query or question please drop a message in the following email: upokary@gmail.com
Copyright © 2026 Upokary. All rights reserved.