Tuesday, October 6, 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 are the differences between properties and attributes in JavaScript?

August 31, 2021 beroza

Can’t access mysql from command line Mac OS

August 27, 2019 beroza

How to disable a link on a webpage using CSS, JavaScript, jQuery etc?

March 3, 2020 beroza

Construct Binary Search Tree from Preorder Traversal

January 16, 2023 beroza

Write a program to check a number is palindrome or not?

December 5, 2021 Avijit Paul

What are the main differences between ApplicationContext and BeanFactory?

November 1, 2025 beroza

How to use WordPress REST API from python?

August 30, 2019 beroza

How to install or setup WordPress multisite?

December 4, 2019 beroza

How to check if an element is visible in the current viewport as we scroll?

July 8, 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.