Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

How can we prohibit inheritance in Java?

Pragya Keshap answered on February 4, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers

  • Java @Inherited
  • Explain the different types of inheritance in Java
  • java inheritance
  • inheritance in java
  • Hierarchical Inheritance in Java
  • Inheritance in Java
  • Java Inheritance
  • java inheritance example
  • what is inheritance in java
  • java inheritance example
  • inheritance in java
  • hybrid inheritance in java
  • inheritance execises in java
  • what is inheritance in java
  • Inheritance in java

  • How can we prohibit inheritance in Java?

    0

    If you mark a class final, it cannot be extended. This will prohibit

    the inheritance of that class in Java.

    https://www.thoughtco.com/how-to-prevent-inheritance-2034337#:~:text=To%20prevent%20inheritance%2C%20use%20the,final%22%20when%20creating%20the%20class.

    Popularity 1/10 Helpfulness 1/10 Language java
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Feb 04 2023
    Pragya Keshap
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.