Understanding Accessor Keywords in X++ Programming Language - D365 F&O Guide

Rumman Ansari   Software Engineer   2024-09-22 03:21:40   507  Share
Subject Syllabus DetailsSubject Details
☰ TContent
☰Fullscreen

Table of Content:

Accessor keywords can be used to control whether the methods in other classes can call the methods in your class. Class inheritance is also affected by the following accessor keywords.

  • public - Methods declared as public can be called from anywhere that the class is accessible. A public method can be overridden by a subclass, unless that method is declared as final.

  • protected - Methods declared as protected can only be called from methods in the same class or methods in a subclass of that class. A protected method can still be overridden in a subclass.

  • private - Methods declared as private can only be called from methods within the same class. Unlike public and protected methods, private methods can't be overridden in a subclass.

MCQ Available

There are 1 MCQs available for this topic.

1 MCQ