Single Choice
Easy
QWhat does the following X++ code snippet achieve?
void new(real _x = 10, real _y = 10)
{
x = _x;
y = _y;
}
ID: #12096
Classes in D365 F&O X++
218 views
Question Info
#12096Q ID
EasyDifficulty
Classes in D365 F&O X++Topic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer
Explanation
-
It creates a constructor named "new" with parameters
_xand_y, and initializes variablesxandywith the provided values. Explanation: In X++, the code defines a constructor named "new" with optional parameters
_xand_y. This constructor is used to initialize the values of the variablesxandywhen an object of the class is created. If no values are provided, the default values of 10 are used.
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic