Friday, January 30, 2026
Latest:
  • Wichtige wörter für B1 prüfung
  • What are the main differences between ApplicationContext and BeanFactory?
  • German B1 Word list
  • How does Lazy annotation work in Spring?
  • How Spring framework resolves circular dependencies?
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

Delete Characters to Make Fancy String

December 25, 2022 beroza

What is contextual typing in TypeScript?

November 16, 2021 beroza

Uncaught TypeError: iterable is not iterable

May 21, 2019 beroza

Write a Program to Find N-ary Tree Preorder Traversal

January 8, 2023 beroza

What is composition in object oriented programming?

December 16, 2023 beroza

How to remove a character from a position of a string in javascript?

March 28, 2022 beroza

apache2.service failed “systemctl status apache2.service” and “journalctl -xe” for details

November 13, 2019 beroza

How to start a Java spring boot application using Jenkins X?

June 27, 2020 beroza

Failed form propType: You provided a `value` prop to a form field without an `onChange` handler

September 2, 2019 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.