Q
You are developing finance and operations apps. using the X++ development language. You have created a class and you want to add a method to it.
You want to add a method that can only be called from methods within the same class and can't be overridden in a subclass.
You need to add an accessor keyword to that method.
Which should you use?
Question Info
Choose the Best Option
Click any option to instantly check if you're correct.
Explanation
The 'private' keyword allows a method to be called only from methods within the same class and can't be overridden in a subclass. 'public' methods can be called from anywhere the class is accessible and can be overridden by a subclass. 'protected' methods can only be called from methods in the same class or methods in a subclass of that class. 'static' is not an accessor keyword, it's used to declare a method that belongs to a class, not an instance of the class.
Common Type System - .NET | Microsoft Learn
Add code and methods to meet business requirements - Training | Microsoft Learn
Want to remember what you got wrong?
Create a free account in seconds to track your score, revisit mistakes and continue X++ Programming Language where you left off.
- Save your progress & streak
- Topic-wise quizzes & scores
- Bookmark tricky questions
- Printable MCQ sets
Nice — 3 questions done!
Don't lose this streak. Sign up free to save your score and pick up exactly where you stopped.
Share This Question
Challenge a friend or share with your study group.