Single Choice Easy

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?

ID: #22589 Exam MB-500: Microsoft Dynamics 365: Finance and Operations Apps Developer 132 views
Question Info
#22589Q ID
EasyDifficulty
Exam MB-500: Microsoft Dynamics 365: Finance and Operations Apps DeveloperTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A static ✔ ✖
  • B private ✔ ✖
  • C public ✔ ✖
  • D protected ✔ ✖
Correct Answer

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

Today: 0 answered · 0 correct
Save progress
Free account

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
Practice smarterFree account · save progress
Sign up free

Share This Question

Challenge a friend or share with your study group.

Related MCQ Questions