0% found this document useful (0 votes)
39 views2 pages

Dshri ABAP FINAL CLASS

Final class is a type of class that cannot be inherited from or have any subclasses. If a subclass is created from a final class, a syntax error will occur stating that a final class cannot have any subclasses. A final method can be inherited but cannot be redefined or overridden in a subclass, and trying to redefine a final method will result in an error.

Uploaded by

dhanu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views2 pages

Dshri ABAP FINAL CLASS

Final class is a type of class that cannot be inherited from or have any subclasses. If a subclass is created from a final class, a syntax error will occur stating that a final class cannot have any subclasses. A final method can be inherited but cannot be redefined or overridden in a subclass, and trying to redefine a final method will result in an error.

Uploaded by

dhanu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

FINAL CLASS

Final class is another type of class. It cannot have any child or sub classes (i.e Inheritance
concept). If we create any sub class of final class then syntax error will come as “The final
class cannot have any sub-class”.

Example program for Final class:

FINAL METHOD
If only a method of class is FINAL, then that class can be inherited but that method cannot be redefined.

If you try to declare the same method using redefinition, then error shown as “ Method is not declared
or inherited in class”.

Example Program for FINAL METHOD:

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy